| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Also it was an empty struct, not a void after all.
llvm-svn: 62920
|
|
|
|
|
|
|
| |
Thus we need to check whether the struct is empty before trying to index into
it. This fixes PR3381.
llvm-svn: 62918
|
|
|
|
|
|
|
| |
handling the case in Transforms/InstCombine/cast-store-gep.ll, which
is a heavily reduced testcase from Clang on x86-64.
llvm-svn: 62904
|
|
|
|
|
|
| |
compatibility with cygwin. Patch by Jay Foad!
llvm-svn: 62695
|
|
|
|
|
|
|
|
| |
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.
llvm-svn: 62645
|
|
|
|
| |
llvm-svn: 62351
|
|
|
|
| |
llvm-svn: 62350
|
|
|
|
|
|
| |
more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
llvm-svn: 62297
|
|
|
|
| |
llvm-svn: 62264
|
|
|
|
|
|
|
|
| |
zext ty2
- Looking at the number of sign bits of the a sext instruction to determine whether new trunc + sext pair should be added when its source is being evaluated in a different type.
llvm-svn: 62263
|
|
|
|
|
|
| |
least their preferred alignment.
llvm-svn: 62176
|
|
|
|
|
|
| |
suggested by Chris.
llvm-svn: 62099
|
|
|
|
|
|
| |
not thrilled about 64-bit % in general, so rewrite to use * instead.
llvm-svn: 62047
|
|
|
|
|
|
| |
We should treat vectors as atomic types, not like arrays.
llvm-svn: 62046
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
canonicalization transform based on duncan's comments:
1) improve the comment about %.
2) within our index loop make sure the offset stays
within the *type size*, instead of within the *abi size*.
This allows us to reason explicitly about landing in tail
padding and means that issues like non-zero offsets into
[0 x foo] types don't occur anymore.
llvm-svn: 62045
|
|
|
|
| |
llvm-svn: 61997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I noticed this in the code compiled for a routine using std::map, which produced
this code:
%25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly
%.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1]
%tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1]
%toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1]
br i1 %toBool, label %bb3, label %bb4
which compiled to:
call L_memcmp$stub
shrl $31, %eax
testb %al, %al
jne LBB1_11 ##
with this change, we compile it to:
call L_memcmp$stub
testl %eax, %eax
js LBB1_11
This triggers all the time in common code, with patters like this:
%169 = and i32 %ply, 1 ; <i32> [#uses=1]
%170 = trunc i32 %169 to i8 ; <i8> [#uses=1]
%toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1]
%7 = lshr i32 %6, 24 ; <i32> [#uses=1]
%9 = trunc i32 %7 to i8 ; <i8> [#uses=1]
%10 = icmp ne i8 %9, 0 ; <i1> [#uses=1]
etc
llvm-svn: 61985
|
|
|
|
| |
llvm-svn: 61984
|
|
|
|
| |
llvm-svn: 61980
|
|
|
|
|
|
| |
(which is constant time and cheap) before checking hasAllZeroIndices.
llvm-svn: 61976
|
|
|
|
|
|
|
| |
as template arguments instead of as instance variables, exposing more
optimization opportunities to the compiler earlier.
llvm-svn: 61776
|
|
|
|
|
|
| |
tests. See PR3266.
llvm-svn: 61623
|
|
|
|
| |
llvm-svn: 61538
|
|
|
|
|
|
|
|
| |
xor (or (icmp, icmp), true) -> and(icmp, icmp)
This is possible because of De Morgan's law.
llvm-svn: 61537
|
|
|
|
|
|
| |
our optz'n will apply to it, then build the replacement vector only if needed.
llvm-svn: 61279
|
|
|
|
|
|
| |
Simplifying the sdiv might allow further simplifications for our users.
llvm-svn: 61196
|
|
|
|
| |
llvm-svn: 61195
|
|
|
|
| |
llvm-svn: 60403
|
|
|
|
| |
llvm-svn: 60402
|
|
|
|
| |
llvm-svn: 60401
|
|
|
|
|
|
|
|
|
| |
constant. If X is a constant, then this is folded elsewhere.
- Added a note to Target/README.txt to indicate that we'd like to implement
this when we're able.
llvm-svn: 60399
|
|
|
|
| |
llvm-svn: 60398
|
|
|
|
|
|
|
|
| |
- No need to do a swap on a canonicalized pattern.
No functionality change.
llvm-svn: 60397
|
|
|
|
| |
llvm-svn: 60370
|
|
|
|
| |
llvm-svn: 60369
|
|
|
|
|
|
| |
integer is "minint".
llvm-svn: 60366
|
|
|
|
|
|
| |
don't have overlapping bits.
llvm-svn: 60344
|
|
|
|
| |
llvm-svn: 60343
|
|
|
|
| |
llvm-svn: 60341
|
|
|
|
|
|
| |
fiddling with constants unless we have to.
llvm-svn: 60340
|
|
|
|
|
|
| |
xor in testcase (or is a substring).
llvm-svn: 60328
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of using FoldPHIArgBinOpIntoPHI. In addition to being more
obvious, this also fixes a problem where instcombine wouldn't merge two
phis that had different variable indices. This prevented instcombine
from factoring big chunks of code in 403.gcc. For example:
insn_cuid.exit:
- %tmp336 = load i32** @uid_cuid, align 4
- %tmp337 = getelementptr %struct.rtx_def* %insn_addr.0.ph.i, i32 0, i32 3
- %tmp338 = bitcast [1 x %struct.rtunion]* %tmp337 to i32*
- %tmp339 = load i32* %tmp338, align 4
- %tmp340 = getelementptr i32* %tmp336, i32 %tmp339
br label %bb62
bb61:
- %tmp341 = load i32** @uid_cuid, align 4
- %tmp342 = getelementptr %struct.rtx_def* %insn, i32 0, i32 3
- %tmp343 = bitcast [1 x %struct.rtunion]* %tmp342 to i32*
- %tmp344 = load i32* %tmp343, align 4
- %tmp345 = getelementptr i32* %tmp341, i32 %tmp344
br label %bb62
bb62:
- %iftmp.62.0.in = phi i32* [ %tmp345, %bb61 ], [ %tmp340, %insn_cuid.exit ]
+ %insn.pn2 = phi %struct.rtx_def* [ %insn, %bb61 ], [ %insn_addr.0.ph.i, %insn_cuid.exit ]
+ %tmp344.pn.in.in = getelementptr %struct.rtx_def* %insn.pn2, i32 0, i32 3
+ %tmp344.pn.in = bitcast [1 x %struct.rtunion]* %tmp344.pn.in.in to i32*
+ %tmp341.pn = load i32** @uid_cuid
+ %tmp344.pn = load i32* %tmp344.pn.in
+ %iftmp.62.0.in = getelementptr i32* %tmp341.pn, i32 %tmp344.pn
%iftmp.62.0 = load i32* %iftmp.62.0.in
llvm-svn: 60325
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
important because it is sinking the loads using the GEPs, but
not the GEPs themselves. This triggers 647 times on 403.gcc
and makes the .s file much much nicer. For example before:
je LBB1_87 ## bb78
LBB1_62: ## bb77
leal 84(%esi), %eax
LBB1_63: ## bb79
movl (%eax), %eax
...
LBB1_87: ## bb78
movl $0, 4(%esp)
movl %esi, (%esp)
call L_make_decl_rtl$stub
jmp LBB1_62 ## bb77
after:
jne LBB1_63 ## bb79
LBB1_62: ## bb78
movl $0, 4(%esp)
movl %esi, (%esp)
call L_make_decl_rtl$stub
LBB1_63: ## bb79
movl 84(%esi), %eax
The input code was (and the GEPs are merged and
the PHI is now eliminated by instcombine):
br i1 %tmp233, label %bb78, label %bb77
bb77:
%tmp234 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22
br label %bb79
bb78:
call void @make_decl_rtl(%struct.tree_node* %t_addr.3, i8* null) nounwind
%tmp235 = getelementptr %struct.tree_node* %t_addr.3, i32 0, i32 0, i32 22
br label %bb79
bb79:
%iftmp.12.0.in = phi %struct.rtx_def** [ %tmp235, %bb78 ], [ %tmp234, %bb77 ]
%iftmp.12.0 = load %struct.rtx_def** %iftmp.12.0.in
llvm-svn: 60322
|
|
|
|
|
|
| |
permutations of this pattern.
llvm-svn: 60312
|
|
|
|
|
|
| |
functional change.
llvm-svn: 60307
|
|
|
|
|
|
|
| |
Note that the FoldOpIntoPhi call is dead because it's impossible for the
first operand of a subtraction to be both a ConstantInt and a PHINode.
llvm-svn: 60306
|
|
|
|
| |
llvm-svn: 60291
|
|
|
|
|
|
| |
takes care of all permutations of this pattern.
llvm-svn: 60290
|
|
|
|
| |
llvm-svn: 60289
|
|
|
|
|
|
|
|
| |
APInt calls instead.
This fixes PR3144.
llvm-svn: 60288
|