| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Not committing a testcase because I think it will be too fragile.
llvm-svn: 149315
|
|
|
|
|
|
| |
unused variables).
llvm-svn: 148230
|
|
|
|
|
|
|
|
|
|
|
| |
We know that the blend instructions only use the MSB, so if the mask is
sign-extended then we can convert it into a SHL instruction. This is a
common pattern because the type-legalizer sign-extends the i1 type which
is used by the LLVM-IR for the condition.
Added a new optimization in SimplifyDemandedBits for SIGN_EXTEND_INREG -> SHL.
llvm-svn: 148225
|
|
|
|
|
|
|
|
| |
of several newly un-defaulted switches. This also helps optimizers
(including LLVM's) recognize that every case is covered, and we should
assume as much.
llvm-svn: 147861
|
|
|
|
| |
llvm-svn: 147855
|
|
|
|
| |
llvm-svn: 146927
|
|
|
|
|
|
| |
but the existing code can't do it correctly. PR11570.
llvm-svn: 146630
|
|
|
|
| |
llvm-svn: 146219
|
|
|
|
|
|
| |
SDNodes. Mark these nodes as illegal by default, unless the target declares otherwise.
llvm-svn: 146171
|
|
|
|
|
|
| |
issue from PR11319.
llvm-svn: 144216
|
|
|
|
|
|
| |
When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses
llvm-svn: 144100
|
|
|
|
|
|
| |
and TargetLowering::BuildUDIV(). Fixes PR11283
llvm-svn: 143964
|
|
|
|
|
|
| |
is going away.
llvm-svn: 142810
|
|
|
|
|
|
| |
Changed tests which assumed that vectors are legalized by widening them.
llvm-svn: 142152
|
|
|
|
|
|
| |
Pointed out by George Russell.
llvm-svn: 141956
|
|
|
|
| |
llvm-svn: 141763
|
|
|
|
|
|
|
|
|
|
|
|
| |
with a vector condition); such selects become VSELECT codegen nodes.
This patch also removes VSETCC codegen nodes, unifying them with SETCC
nodes (codegen was actually often using SETCC for vector SETCC already).
This ensures that various DAG combiner optimizations kick in for vector
comparisons. Passes dragonegg bootstrap with no testsuite regressions
(nightly testsuite as well as "make check-all"). Patch mostly by
Nadav Rotem.
llvm-svn: 139159
|
|
|
|
|
|
|
| |
If we have a chain of zext -> assert_zext -> zext -> use, the first zext would get simplified away because of the later zext, and then the later zext would get simplified away because of the assert. The solution is to teach SimplifyDemandedBits that assert_zext demands all of the high bits of its input, rather than only those demanded by its users. No testcase because the only example I have manifests as llvm-gcc miscompiling LLVM, and I haven't found a smaller case that reproduces this problem.
Fixes <rdar://problem/10063365>.
llvm-svn: 139059
|
|
|
|
|
|
|
|
| |
platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing.
I think this completes the basic CodeGen for atomicrmw and cmpxchg.
llvm-svn: 136813
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
|
|
|
|
|
| |
when determining validity of matching constraint. Allow i1
types access to the GR8 reg class for x86.
Fixes PR10352 and rdar://9777108
llvm-svn: 135180
|
|
|
|
|
|
| |
is to use this for architectures that have a native FMA instruction.
llvm-svn: 134742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have to do this in DAGBuilder instead of DAGCombiner, because the exact bit is lost after building.
struct foo { char x[24]; };
long bar(struct foo *a, struct foo *b) { return a-b; }
is now compiled into
movl 4(%esp), %eax
subl 8(%esp), %eax
sarl $3, %eax
imull $-1431655765, %eax, %eax
instead of
movl 4(%esp), %eax
subl 8(%esp), %eax
movl $715827883, %ecx
imull %ecx
movl %edx, %eax
shrl $31, %eax
sarl $2, %edx
addl %eax, %edx
movl %edx, %eax
llvm-svn: 134695
|
|
|
|
| |
llvm-svn: 134647
|
|
|
|
|
|
| |
Fixes rdar://9643582
llvm-svn: 134123
|
|
|
|
|
|
|
|
|
| |
calls if we haven't been able to lower them any
other way.
Fixes rdar://9090077 and rdar://9210061
llvm-svn: 133288
|
|
|
|
|
|
| |
types such as i33 were rounded to i32. Originated from Duncan's testcase.
llvm-svn: 132893
|
|
|
|
| |
llvm-svn: 132872
|
|
|
|
| |
llvm-svn: 132871
|
|
|
|
| |
llvm-svn: 132681
|
|
|
|
|
|
|
|
|
| |
(only happens when using the -promote-elements option).
The correct legalization order is to first try to promote element. Next, we try
to widen vectors.
llvm-svn: 132648
|
|
|
|
|
|
| |
Part of rdar://9119939
llvm-svn: 132510
|
|
|
|
| |
llvm-svn: 132479
|
|
|
|
| |
llvm-svn: 132424
|
|
|
|
|
|
| |
rdar://problem/5660695
llvm-svn: 132411
|
|
|
|
| |
llvm-svn: 132396
|
|
|
|
|
|
|
|
|
| |
patch we add a flag to enable a new type legalization decision - to promote
integer elements in vectors. Currently, the rest of the codegen does not support
this kind of legalization. This flag will be removed when the transition is
complete.
llvm-svn: 132394
|
|
|
|
|
|
|
|
|
|
|
| |
LegalizeTypeAction.
This patch does not change the behavior of the type legalizer. The codegen
produces the same code.
This infrastructural change is needed in order to enable complex decisions
for vector types (needed by the vector-select patch).
llvm-svn: 132263
|
|
|
|
|
|
| |
code in one place. Re-apply 131534 and fix the multi-step promotion of integers.
llvm-svn: 132217
|
|
|
|
| |
llvm-svn: 131663
|
|
|
|
|
|
|
|
| |
Original log entry:
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.
llvm-svn: 131536
|
|
|
|
|
|
| |
code in one place.
llvm-svn: 131534
|
|
|
|
|
|
| |
Patch by Evan Cheng.
llvm-svn: 131093
|
|
|
|
|
|
| |
functionality change.
llvm-svn: 131012
|
|
|
|
|
|
|
|
|
|
|
|
| |
On x86 this allows to fold a load into the cmp, greatly reducing register pressure.
movzbl (%rdi), %eax
cmpl $47, %eax
->
cmpb $47, (%rdi)
This shaves 8k off gcc.o on i386. I'll leave applying the patch in README.txt to Chris :)
llvm-svn: 130005
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
| |
llvm-svn: 129503
|
|
|
|
|
|
| |
where the RHS is of the legal type for the new operation.
llvm-svn: 129484
|
|
|
|
|
|
| |
rdar://8911343
llvm-svn: 128696
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiplied value by introducing an early shift.
This allows us to compile "unsigned foo(unsigned x) { return x/28; }" into
shrl $2, %edi
imulq $613566757, %rdi, %rax
shrq $32, %rax
ret
instead of
movl %edi, %eax
imulq $613566757, %rax, %rcx
shrq $32, %rcx
subl %ecx, %eax
shrl %eax
addl %ecx, %eax
shrl $4, %eax
on x86_64
llvm-svn: 127829
|