- Jun 24, 2009
-
-
Dan Gohman authored
terminator, instead of after the last phi. This fixes a bug exposed by ScalarEvolution analyzing more kinds of loops. This fixes PR4436. llvm-svn: 74072
-
Dan Gohman authored
trip counts in more cases. Generalize ScalarEvolution's isLoopGuardedByCond code to recognize And and Or conditions, splitting the code out into an isNecessaryCond helper function so that it can evaluate Ands and Ors recursively, and make SCEVExpander be much more aggressive about hoisting instructions out of loops. test/CodeGen/X86/pr3495.ll has an additional instruction now, but it appears to be due to an arbitrary register allocation difference. llvm-svn: 74048
-
Dan Gohman authored
preheader is already an instruction. llvm-svn: 74031
-
- Jun 23, 2009
-
-
Dan Gohman authored
llvm-svn: 73910
-
- Jun 22, 2009
-
-
Owen Anderson authored
llvm-svn: 73906
-
Dan Gohman authored
now, this hasn't mattered, because ScalarEvolution hasn't been able to compute trip counts for loops with multiple exits. But it will soon. llvm-svn: 73864
-
Dan Gohman authored
terminology that LoopInfo uses. llvm-svn: 73863
-
- Jun 20, 2009
-
-
Dan Gohman authored
llvm-svn: 73796
-
Dan Gohman authored
hand-crafted testcase which demonstrates the bug that was exposed in 254.gap. llvm-svn: 73793
-
Dan Gohman authored
which it isn't prepared to handle. llvm-svn: 73787
-
- Jun 19, 2009
-
-
Evan Cheng authored
llvm-svn: 73783
-
Chris Lattner authored
as if they were multiple uses of the same instruction. This interacts well with the existing loadpre that j-t does to open up many new jump threads earlier. llvm-svn: 73768
-
Nick Lewycky authored
llvm-svn: 73755
-
Chris Lattner authored
when it allows forming a tail call. Patch by Frits van Bommel. This implements PR4323. llvm-svn: 73752
-
Chris Lattner authored
strcmp -> memcmp when the lengths of the strings are unknown. Patch by Nick Lewycky! llvm-svn: 73751
-
- Jun 18, 2009
-
-
Dan Gohman authored
as signed max tests. Along with r73717, this helps CodeGen avoid emitting code for a maximum operation for this class of loop. llvm-svn: 73718
-
Anton Korobeynikov authored
llvm-svn: 73715
-
Dan Gohman authored
casted induction variables in cases where the cast isn't foldable. It ended up being a pessimization in many cases. This could be fixed, but it would require a bunch of complicated code in IVUsers' clients. The advantages of this approach aren't visible enough to justify it at this time. llvm-svn: 73706
-
Dan Gohman authored
C is not a low-bits mask, and add a similar instcombine for zext((trunc(t) & C) ^ C). llvm-svn: 73705
-
Dan Gohman authored
multiple users. llvm-svn: 73656
-
- Jun 17, 2009
-
-
Dale Johannesen authored
move loads back past a check that the load address is valid, see new testcase. The test that went in with 72661 has exactly this case, except that the conditional it's moving past is checking something else; I've settled for changing that test to reference a global, not a pointer. It may be possible to scan all the tests you pass and make sure none of them are checking any component of the address, but it's not trivial and I'm not trying to do that here. llvm-svn: 73632
-
Torok Edwin authored
llvm-svn: 73625
-
Dan Gohman authored
llvm-svn: 73621
-
Sanjiv Gupta authored
>> What if my global variable was into a different address space than stack? >> > > It doesn't matter in terms of semantics: because AnalyzeGlobal > returned false, we're guaranteed the address of the global is never > taken. I wouldn't be surprised if we end up generating invalid IR in > some cases, though, because of the semantics of replaceAllUsesWith. > Do you have a testcase that breaks? > > The problem is replaceAllUsesWith asserts for type mismatch here. Try attached .bc with llvm-ld. assert(New->getType() == getType() && "replaceAllUses of value with new value of different type!"); Since stack is always on address space zero, I don't think that type of GV in a different address space is ever going to match. The other way is to allow replaceAllUsesWith to ignore address spaces while comparing types. (do we have a way to do that ?). But then such an optimization may fail the entire idea of user wanting to place a variable into different memory space. The original idea of user might be to save on the stack space (data memory) and hence he asked the variable to be placed into different memory space (program memory). So the best bet here is to deny this optimization by checking GV->getType()->getAddressSpace() == 0. llvm-svn: 73605
-
Eli Friedman authored
SRem. llvm-svn: 73598
-
- Jun 16, 2009
-
-
Dan Gohman authored
llvm-svn: 73541
-
Chris Lattner authored
to ignore readonly calls, and factor it out of instcombine so that it can be used by other passes. Patch by Frits van Bommel! llvm-svn: 73506
-
Dan Gohman authored
llvm-svn: 73451
-
Dan Gohman authored
failures. To support this, add some utility functions to Type to help support vector/scalar-independent code. Change ConstantInt::get and ConstantFP::get to support vector types, and add an overload to ConstantInt::get that uses a static IntegerType type, for convenience. Introduce a new getConstant method for ScalarEvolution, to simplify common use cases. llvm-svn: 73431
-
- Jun 15, 2009
-
-
Dale Johannesen authored
problem addressed in 31284, but the patch there only addressed the case where an invoke is the first thing in a block. llvm-svn: 73416
-
Owen Anderson authored
llvm-svn: 73412
-
Dan Gohman authored
llvm-svn: 73398
-
Dan Gohman authored
llvm-svn: 73362
-
Dan Gohman authored
SmallVector instead of std::vector. llvm-svn: 73357
-
Dan Gohman authored
llvm-svn: 73355
-
- Jun 14, 2009
-
-
Torok Edwin authored
llvm-svn: 73342
-
Owen Anderson authored
is that, for functions whose bodies are entirely guarded by an if-statement, it can be profitable to pull the test out of the callee and into the caller. This code has had some cursory testing, but still has a number of known issues on the LLVM test suite. llvm-svn: 73338
-
- Jun 13, 2009
-
-
Nick Lewycky authored
pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review! llvm-svn: 73299
-
Dan Gohman authored
induction variable when the addrec to be expanded does not require a wider type. This eliminates the need for IndVarSimplify to micro-manage SCEV expansions, because SCEVExpander now automatically expands them in the form that IndVarSimplify considers to be canonical. (LSR still micro-manages its SCEV expansions, because it's optimizing for the target, rather than for other optimizations.) Also, this uses the new getAnyExtendExpr, which has more clever expression simplification logic than the IndVarSimplify code it replaces, and this cleans up some ugly expansions in code such as the included masked-iv.ll testcase. llvm-svn: 73294
-
- Jun 12, 2009
-
-
Chris Lattner authored
non-default addrspaces. llvm-svn: 73253
-