- Oct 31, 2012
-
-
Hans Wennborg authored
By propagating the value for the switch condition, LLVM can now build lookup tables for code such as: switch (x) { case 1: return 5; case 2: return 42; case 3: case 4: case 5: return x - 123; default: return 123; } Given that x is known for each case, "x - 123" becomes a constant for cases 3, 4, and 5. llvm-svn: 167115
-
Benjamin Kramer authored
llvm-svn: 167113
-
Benjamin Kramer authored
I'm not entirely happy with this solution, but I don't see a smarter way currently. Fixes PR14214. llvm-svn: 167112
-
Benjamin Kramer authored
This makes the code match the comments. Resolves a crash in loop idiom (PR14219). llvm-svn: 167110
-
James Molloy authored
No testcase, as this is only testable on a C-A15 board. llvm-svn: 167108
-
Reed Kotler authored
llvm-svn: 167107
-
Craig Topper authored
llvm-svn: 167106
-
Meador Inge authored
This patch migrates the strpbrk optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167105
-
Michael Liao authored
llvm-svn: 167104
-
Meador Inge authored
This patch migrates the strlen optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167103
-
Meador Inge authored
This patch migrates the strncpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167102
-
Nadav Rotem authored
llvm-svn: 167101
-
Bill Schmidt authored
parameters. Examples of these are: struct { } a; union { } b[256]; int a[0]; An empty aggregate has an address, although dereferencing that address is pointless. When passed as a parameter, an empty aggregate does not consume a protocol register, nor does it consume a doubleword in the parameter save area. Passing an empty aggregate by reference passes an address just as for any other aggregate. Returning an empty aggregate uses GPR3 as a hidden address of the return value location, just as for any other aggregate. The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate parameters passed by value. The handling of return values and by-reference parameters was already correct. Built on powerpc64-unknown-linux-gnu and tested with no new regressions. A test case is included to test proper handling of empty aggregate parameters on both sides of the function call protocol. llvm-svn: 167090
-
Akira Hatanaka authored
type MachineInstr* and MachineBasicBlock::iterator. llvm-svn: 167088
-
Akira Hatanaka authored
llvm-svn: 167086
-
Nadav Rotem authored
This is important for loops in the LAPACK test-suite. These loops start at 1 because they are auto-converted from fortran. llvm-svn: 167084
-
Meador Inge authored
This patch migrates the stpcpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. Note that the __stpcpy_chk simplifications were migrated in a previous commit. llvm-svn: 167083
-
Meador Inge authored
r166198 migrated the strcpy optimization to instcombine. The strcpy simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp was also doing some __strcpy_chk simplifications. Those fortified simplifications were migrated as well, but introduced a bug in the __stpcpy_chk simplifier in the process. This happened because the __strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt which was updated with simplifications that worked for __strcpy_chk, but not __stpcpy_chk. This patch fixes the problem by adding proper test coverage and creating a new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk). llvm-svn: 167082
-
Manman Ren authored
the first source operand is tied to the destination operand. This is to accurately model the corresponding instructions where the upper bits are unmodified. rdar://12558838 PR14221 llvm-svn: 167064
-
- Oct 30, 2012
-
-
Eli Friedman authored
llvm-svn: 167057
-
Manman Ren authored
We used to generate a store (movq) + a load. Now we use movd. rdar://9946746 llvm-svn: 167056
-
Nadav Rotem authored
llvm-svn: 167055
-
Eric Christopher authored
yet, but it's better. llvm-svn: 167053
-
Chandler Carruth authored
integers in that the code to handle split alloca-wide integer loads or stores doesn't come first. It should, for the same reasons as with integers, and the PR attests to that. Also had to fix a busted assert in that this test case also covers. llvm-svn: 167051
-
Chad Rosier authored
llvm-svn: 167050
-
Hal Finkel authored
Instead of recomputing relative pointer information just prior to fusing, cache this information (which also needs to be computed during the candidate-pair selection process). This cuts down on the total number of SE queries made, and also is a necessary intermediate step on the road toward including shuffle costs in the pair selection procedure. No functionality change is intended. llvm-svn: 167049
-
Akira Hatanaka authored
use the caller's stack. llvm-svn: 167048
-
Chad Rosier authored
llvm-svn: 167046
-
Benjamin Kramer authored
Thanks to Preston Briggs for catching this! llvm-svn: 167045
-
Hal Finkel authored
We need to make sure that we take the correct load/store alignment when the inputs are flipped. llvm-svn: 167044
-
Akira Hatanaka authored
information will be used by IsEligibleForTailCallOptimization to determine whether a call can be tail-call optimized. llvm-svn: 167043
-
Hal Finkel authored
Stop propagating the FlipMemInputs variable into the routines that create the replacement instructions. Instead, just flip the arguments of those routines. This allows for some associated cleanup (not all of which is done here). No functionality change is intended. llvm-svn: 167042
-
Akira Hatanaka authored
for passing a function call argument on a stack. llvm-svn: 167041
-
Chad Rosier authored
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation. For inline assembly, however, we need to compute these based on the constraints. Revert r166929 as this is no longer needed, but leave the test case in place. rdar://12033048 and PR13504 llvm-svn: 167040
-
Akira Hatanaka authored
llvm-svn: 167039
-
Hal Finkel authored
SE was being called during the instruction-fusion process (when the result is unreliable, and thus ignored). No functionality change is intended. llvm-svn: 167037
-
Nadav Rotem authored
llvm-svn: 167036
-
Nadav Rotem authored
Speedup SciMark by 1% llvm-svn: 167035
-
Adhemerval Zanella authored
This patch expands FSQRT for floating point vector types when altivec is used. llvm-svn: 167034
-
Nadav Rotem authored
LoopVectorize: Fix a bug in the initialization of reduction variables. AND needs to start at all-one while XOR, and OR need to start at zero. llvm-svn: 167032
-