| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
| 
|  | 
This patch migrates the strto* optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 167119
 | 
| | 
| 
| 
|  | 
llvm-svn: 167117
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
cheaper.
No functionality change.
llvm-svn: 167116
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 167113
 | 
| | 
| 
| 
| 
| 
| 
|  | 
I'm not entirely happy with this solution, but I don't see a smarter way currently.
Fixes PR14214.
llvm-svn: 167112
 | 
| | 
| 
| 
| 
| 
|  | 
This makes the code match the comments. Resolves a crash in loop idiom (PR14219).
llvm-svn: 167110
 | 
| | 
| 
| 
| 
| 
|  | 
No testcase, as this is only testable on a C-A15 board.
llvm-svn: 167108
 | 
| | 
| 
| 
|  | 
llvm-svn: 167107
 | 
| | 
| 
| 
| 
| 
|  | 
Cameron McInally.
llvm-svn: 167106
 | 
| | 
| 
| 
| 
| 
| 
|  | 
This patch migrates the strpbrk optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 167105
 | 
| | 
| 
| 
|  | 
llvm-svn: 167104
 | 
| | 
| 
| 
| 
| 
| 
|  | 
This patch migrates the strlen optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 167103
 | 
| | 
| 
| 
| 
| 
| 
|  | 
This patch migrates the strncpy optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
llvm-svn: 167102
 | 
| | 
| 
| 
|  | 
llvm-svn: 167101
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
|  | 
type MachineInstr* and MachineBasicBlock::iterator.
llvm-svn: 167088
 | 
| | 
| 
| 
|  | 
llvm-svn: 167086
 | 
| | 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 167057
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
We used to generate a store (movq) + a load.
Now we use movd.
rdar://9946746
llvm-svn: 167056
 | 
| | 
| 
| 
|  | 
llvm-svn: 167055
 | 
| | 
| 
| 
| 
| 
|  | 
yet, but it's better.
llvm-svn: 167053
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 167050
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
|  | 
use the caller's stack.
llvm-svn: 167048
 | 
| | 
| 
| 
|  | 
llvm-svn: 167046
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
into memmove.
Thanks to Preston Briggs for catching this!
llvm-svn: 167045
 | 
| | 
| 
| 
| 
| 
| 
|  | 
We need to make sure that we take the correct load/store alignment
when the inputs are flipped.
llvm-svn: 167044
 | 
| | 
| 
| 
| 
| 
| 
|  | 
information will be used by IsEligibleForTailCallOptimization to determine
whether a call can be tail-call optimized.
llvm-svn: 167043
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
|  | 
for passing a function call argument on a stack.
llvm-svn: 167041
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 167039
 | 
| | 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 167036
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
is a single pointer.
Speedup SciMark by 1%
llvm-svn: 167035
 | 
| | 
| 
| 
| 
| 
| 
|  | 
This patch expands FSQRT for floating point vector types when altivec is
used.
llvm-svn: 167034
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
needs to start at all-one
while XOR, and OR need to start at zero.
llvm-svn: 167032
 | 
| | 
| 
| 
|  | 
llvm-svn: 167029
 | 
| | 
| 
| 
|  | 
llvm-svn: 167027
 | 
| | 
| 
| 
|  | 
llvm-svn: 167020
 | 
| | 
| 
| 
| 
| 
|  | 
with different sizes.
llvm-svn: 167018
 | 
| | 
| 
| 
| 
| 
| 
| 
|  | 
This patch adds more support for vector type comparisons using altivec.
It adds correct support for v16i8, v8i16, v4i32, and v4f32 vector
types for comparison operators ==, !=, >, >=, <, and <=.
llvm-svn: 167015
 | 
| | 
| 
| 
| 
| 
| 
|  | 
Simplify the implementation of the corresponding integer and float functions and
move them inline while there.
llvm-svn: 167014
 | 
| | 
| 
| 
| 
| 
|  | 
This fixes Clang :: CodeGen/complex-builtints.c on PowerPC.
llvm-svn: 167013
 |