| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
legalizer may call us with an overly large type.
llvm-svn: 162101
|
|
|
|
| |
llvm-svn: 161061
|
|
|
|
|
|
| |
to do so.
llvm-svn: 161053
|
|
|
|
| |
llvm-svn: 160475
|
|
|
|
| |
llvm-svn: 160354
|
|
|
|
| |
llvm-svn: 160350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
large immediates. Add dag combine logic to recover in case the large
immediates doesn't fit in cmp immediate operand field.
int foo(unsigned long l) {
return (l>> 47) == 1;
}
we produce
%shr.mask = and i64 %l, -140737488355328
%cmp = icmp eq i64 %shr.mask, 140737488355328
%conv = zext i1 %cmp to i32
ret i32 %conv
which codegens to
movq $0xffff800000000000,%rax
andq %rdi,%rax
movq $0x0000800000000000,%rcx
cmpq %rcx,%rax
sete %al
movzbl %al,%eax
ret
TargetLowering::SimplifySetCC would transform
(X & -256) == 256 -> (X >> 8) == 1
if the immediate fails the isLegalICmpImmediate() test. For x86,
that's immediates which are not a signed 32-bit immediate.
Based on a patch by Eli Friedman.
PR10328
rdar://9758774
llvm-svn: 160346
|
|
|
|
|
|
| |
corresponding clang warning.
llvm-svn: 159742
|
|
|
|
|
|
| |
booleans. Patch by James Benton.
llvm-svn: 159739
|
|
|
|
|
|
| |
instead.
llvm-svn: 159611
|
|
|
|
| |
llvm-svn: 157925
|
|
|
|
| |
llvm-svn: 157885
|
|
|
|
|
|
| |
small bug in the process.
llvm-svn: 157446
|
|
|
|
|
|
|
|
|
|
|
| |
This will be used to determine whether it's profitable to turn a select into a
branch when the branch is likely to be predicted.
Currently enabled for everything but Atom on X86 and Cortex-A9 devices on ARM.
I'm not entirely happy with the name of this flag, suggestions welcome ;)
llvm-svn: 156233
|
|
|
|
|
|
|
|
| |
We want the representative register class to contain the largest
super-registers available. This makes the function less sensitive to the
register class numbering.
llvm-svn: 156220
|
|
|
|
|
|
|
|
| |
The masks returned by SuperRegClassIterator are computed automatically
by TableGen. This is better than depending on the manually specified
SuperRegClasses.
llvm-svn: 156147
|
|
|
|
|
|
| |
widening of vectors.
llvm-svn: 155296
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transformation:
(X op C1) ^ C2 --> (X op C1) & ~C2 iff (C1&C2) == C2
should be done.
This change has been tested:
Using a debug+asserts build:
on the specific test case that brought this bug to light
make check-all
lnt nt
using this clang to build a release version of clang
Using the release+asserts clang-with-clang build:
on the specific test case that brought this bug to light
make check-all
lnt nt
Checking in because Evan wants it checked in. Test case forthcoming after
scrubbing.
llvm-svn: 154955
|
|
|
|
|
|
| |
GOT if jump table uses 64-bit gp-relative relocation.
llvm-svn: 154341
|
|
|
|
|
|
|
|
| |
in TargetLowering. There was already a FIXME about this location being
odd. The interface is simplified as a consequence. This will also make
it easier to change TLS models when compiling with PIE.
llvm-svn: 154292
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LSR always tries to make the ICmp in the loop latch use the incremented
induction variable. This allows the induction variable to be kept in a
single register.
When the induction variable limit is equal to the stride,
SimplifySetCC() would break LSR's hard work by transforming:
(icmp (add iv, stride), stride) --> (cmp iv, 0)
This forced us to use lea for the IC update, preventing the simpler
incl+cmp.
<rdar://problem/7643606>
<rdar://problem/11184260>
llvm-svn: 154119
|
|
|
|
|
|
|
|
| |
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.
llvm-svn: 154011
|
|
|
|
| |
llvm-svn: 153996
|
|
|
|
|
|
|
|
|
|
|
| |
When folding X == X we need to check getBooleanContents() to determine if the
result is a vector of ones or a vector of negative ones.
I tried creating a test case, but the problem seems to only be exposed on a
much older version of clang (around r144500).
rdar://10923049
llvm-svn: 153966
|
|
|
|
|
|
| |
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
|