- Feb 03, 2009
-
-
Devang Patel authored
If "optimize for size" attribute is set then block non-trivial loop unswitches but allow trivial loop unswitches. llvm-svn: 63670
-
Chris Lattner authored
llvm-svn: 63659
-
Chris Lattner authored
renaming it to ConvertScalar_ExtractValue llvm-svn: 63658
-
Chris Lattner authored
no functionality change. llvm-svn: 63652
-
Chris Lattner authored
functionality change. llvm-svn: 63651
-
Chris Lattner authored
aggregate values. loads are not yet handled (coming soon to an sroa near you). llvm-svn: 63649
-
Chris Lattner authored
accessed at least once as a vector. This prevents it from compiling the example in not-a-vector into: define double @test(double %A, double %B) { %tmp4 = insertelement <7 x double> undef, double %A, i32 0 %tmp = insertelement <7 x double> %tmp4, double %B, i32 4 %tmp2 = extractelement <7 x double> %tmp, i32 4 ret double %tmp2 } instead, producing the integer code. Producing vectors when they aren't otherwise in the program is dangerous because a lot of other code treats them carefully and doesn't want to break them down. OTOH, many things want to break down tasty i448's. llvm-svn: 63638
-
Evan Cheng authored
llvm-svn: 63631
-
Chris Lattner authored
llvm-svn: 63620
-
Chris Lattner authored
crazy cases like: struct f { int A, B, C, D, E, F; }; short test4() { struct f A; A.A = 1; memset(&A.B, 2, 12); return A.C; } llvm-svn: 63596
-
Chris Lattner authored
With the new world order, it can handle cases where the first store into the alloca is an element of the vector, instead of requiring the first analyzed store to have the vector type itself. This allows us to un-xfail test/CodeGen/X86/vec_ins_extract.ll. llvm-svn: 63590
-
- Feb 02, 2009
-
-
Chris Lattner authored
llvm-svn: 63544
-
Chris Lattner authored
tests. Thanks for the beautiful reduced testcase Duncan! llvm-svn: 63529
-
Duncan Sands authored
and remove trailing whitespace. No functionality change. llvm-svn: 63511
-
Duncan Sands authored
llvm-svn: 63510
-
Chris Lattner authored
llvm-svn: 63500
-
- Jan 31, 2009
-
-
Nick Lewycky authored
turn icmp eq a+x, b+x into icmp eq a, b if a+x or b+x has other uses. This may have been increasing register pressure leading to the bzip2 slowdown. llvm-svn: 63487
-
Chris Lattner authored
improvements to the EvaluateInDifferentType code. This code works by just inserted a bunch of new code and then seeing if it is useful. Instcombine is not allowed to do this: it can only insert new code if it is useful, and only when it is converging to a more canonical fixed point. Now that we iterate when DCE makes progress, this causes an infinite loop when the code ends up not being used. llvm-svn: 63483
-
Chris Lattner authored
simplifydemandedbits to simplify instructions with *multiple uses* in contexts where it can get away with it. This allows it to simplify the code in multi-use-or.ll into a single 'add double'. This change is particularly interesting because it will cover up for some common codegen bugs with large integers created due to the recent SROA patch. When working on fixing those bugs, this should be disabled. llvm-svn: 63481
-
Chris Lattner authored
llvm-svn: 63480
-
Chris Lattner authored
Now, if it detects that "V" is the same as some other value, SimplifyDemandedBits returns the new value instead of RAUW'ing it immediately. This has two benefits: 1) simpler code in the recursive SimplifyDemandedBits routine. 2) it allows future fun stuff in instcombine where an operation has multiple uses and can be simplified in one context, but not all. #2 isn't implemented yet, this patch should have no functionality change. llvm-svn: 63479
-
Chris Lattner authored
llvm-svn: 63477
-
Chris Lattner authored
not doing so prevents it from properly iterating and prevents it from deleting the entire body of dce-iterate.ll llvm-svn: 63476
-
Chris Lattner authored
be able to handle *ANY* alloca that is poked by loads and stores of bitcasts and GEPs with constant offsets. Before the code had a number of annoying limitations and caused it to miss cases such as storing into holes in structs and complex casts (as in bitfield-sroa) where we had unions of bitfields etc. This also handles a number of important cases that are exposed due to the ABI lowering stuff we do to pass stuff by value. One case that is pretty great is that we compile 2006-11-07-InvalidArrayPromote.ll into: define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind { %tmp10 = call <4 x i32> @llvm.x86.sse2.cvttps2dq(<4 x float> %v1) %tmp105 = bitcast <4 x i32> %tmp10 to i128 %tmp1056 = zext i128 %tmp105 to i256 %tmp.upgrd.43 = lshr i256 %tmp1056, 96 %tmp.upgrd.44 = trunc i256 %tmp.upgrd.43 to i32 ret i32 %tmp.upgrd.44 } which turns into: _func: subl $28, %esp cvttps2dq %xmm1, %xmm0 movaps %xmm0, (%esp) movl 12(%esp), %eax addl $28, %esp ret Which is pretty good code all things considering :). One effect of this is that SROA will start generating arbitrary bitwidth integers that are a multiple of 8 bits. In the case above, we got a 256 bit integer, but the codegen guys assure me that it can handle the simple and/or/shift/zext stuff that we're doing on these operations. This addresses rdar://6532315 llvm-svn: 63469
-
- Jan 28, 2009
-
-
Chris Lattner authored
after the others. llvm-svn: 63227
-
Duncan Sands authored
llvm-svn: 63198
-
- Jan 26, 2009
-
-
Mon P Wang authored
has a different number of elements than the output. llvm-svn: 62998
-
Chris Lattner authored
llvm-svn: 62985
-
Chris Lattner authored
handling the flaw inherent in that assumption. :) llvm-svn: 62984
-
Chris Lattner authored
llvm-svn: 62983
-
Chris Lattner authored
llvm-svn: 62982
-
- Jan 24, 2009
-
-
Torok Edwin authored
Also it was an empty struct, not a void after all. llvm-svn: 62920
-
Torok Edwin authored
Thus we need to check whether the struct is empty before trying to index into it. This fixes PR3381. llvm-svn: 62918
-
Chris Lattner authored
handling the case in Transforms/InstCombine/cast-store-gep.ll, which is a heavily reduced testcase from Clang on x86-64. llvm-svn: 62904
-
- Jan 23, 2009
-
-
Gabor Greif authored
There is now a direct way from value-use-iterator to incoming block in PHINode's API. This way we avoid the iterator->index->iterator trip, and especially the costly getOperandNo() invocation. Additionally there is now an assertion that the iterator really refers to one of the PHI's Uses. llvm-svn: 62869
-
- Jan 21, 2009
-
-
Chris Lattner authored
compatibility with cygwin. Patch by Jay Foad! llvm-svn: 62695
-
Dale Johannesen authored
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
-
- Jan 19, 2009
-
-
Chris Lattner authored
llvm-svn: 62535
-
Chris Lattner authored
llvm-svn: 62529
-
- Jan 18, 2009
-
-