llvm-6502/test/Transforms
Meador Inge 0c4cbc33dd Remove hard-coded constant in Transforms/InstCombine/memcmp-1.ll
Transforms/InstCombine/memcmp-1.ll has a test case that looks like:

  @foo = constant [4 x i8] c"foo\00"
  @hel = constant [4 x i8] c"hel\00"

  ...

  %mem1 = getelementptr [4 x i8]* @hel, i32 0, i32 0
  %mem2 = getelementptr [4 x i8]* @foo, i32 0, i32 0
  %ret = call i32 @memcmp(i8* %mem1, i8* %mem2, i32 3)
  ret i32 %ret
  ; CHECK: ret i32 2

The folded return value (2 above) is computed using the system memcmp
that the compiler is linked with.  This can return different values on
different systems.  The test was originally written on an OS X 10.7.5
x86-64 box and passed.  However, it failed on one of the x86-64 FreeBSD
buildbots because the system memcpy on that machine returned a different
value (1 instead of 2).

I fixed the test by checking the folding constants with regexes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167691 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-11 07:10:25 +00:00
..
ADCE
ArgumentPromotion
BBVectorize BBVectorize: Commit the rest of the test-case change. 2012-11-01 21:57:27 +00:00
BlockPlacement
BranchFolding
CodeExtractor
CodeGenPrepare
ConstantMerge
ConstProp llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. 2012-11-08 20:34:25 +00:00
CorrelatedValuePropagation
DeadArgElim
DeadStoreElimination
EarlyCSE
FunctionAttrs
GlobalDCE
GlobalOpt
GVN llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. 2012-11-08 20:34:25 +00:00
IndVarSimplify Fix SCEV cache invalidation in LCSSA and LoopSimplify. 2012-10-26 17:31:43 +00:00
Inline
InstCombine Remove hard-coded constant in Transforms/InstCombine/memcmp-1.ll 2012-11-11 07:10:25 +00:00
InstSimplify
Internalize Change the internalize pass to internalize all symbols when given an empty 2012-10-26 18:47:48 +00:00
IPConstantProp
JumpThreading Add a test case for PR14233. 2012-11-01 10:26:36 +00:00
LCSSA
LICM Set %defaultjit to use MCJIT for PowerPC targets. 2012-10-30 18:07:58 +00:00
LoopDeletion
LoopIdiom Add a testcase to loop-idiom to cover PR14241 when we start handling 2012-11-02 08:40:24 +00:00
LoopRotate
LoopSimplify
LoopStrengthReduce
LoopUnroll getSmallConstantTripMultiple should never return zero. 2012-10-24 19:46:44 +00:00
LoopUnswitch
LoopVectorize Add support for memory runtime check. When we can, we calculate array bounds. 2012-11-09 07:09:44 +00:00
LowerAtomic
LowerExpectIntrinsic
LowerInvoke
LowerSwitch
Mem2Reg
MemCpyOpt
MergeFunc
MetaRenamer
ObjCARC
PhaseOrdering
PruneEH
Reassociate
ScalarRepl
SCCP llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. 2012-11-08 20:34:25 +00:00
SimplifyCFG Only do switch-to-lookup table transformation when TargetTransformInfo 2012-11-07 21:35:12 +00:00
SimplifyLibCalls instcombine: Migrate memset optimizations 2012-11-11 06:49:03 +00:00
Sink
SROA Fix PR14212: For some strange reason I treated vectors differently from 2012-10-30 20:52:40 +00:00
StripSymbols
TailCallElim Revert r166407 because it caused analyzer tests to crash and broke self-host bots. 2012-10-22 18:16:14 +00:00
TailDup