summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/SCCP
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/SCCP')
-rw-r--r--llvm/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll8
-rw-r--r--llvm/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll19
-rw-r--r--llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll33
-rw-r--r--llvm/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll9
-rw-r--r--llvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll30
-rw-r--r--llvm/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll23
-rw-r--r--llvm/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll18
-rw-r--r--llvm/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll12
-rw-r--r--llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll103
-rw-r--r--llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll140
-rw-r--r--llvm/test/Transforms/SCCP/2006-12-19-UndefBug.ll8
-rw-r--r--llvm/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll45
-rw-r--r--llvm/test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll36
-rw-r--r--llvm/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll11
-rw-r--r--llvm/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll14
-rw-r--r--llvm/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll26
-rw-r--r--llvm/test/Transforms/SCCP/2009-05-27-VectorOperandZero.ll10
-rw-r--r--llvm/test/Transforms/SCCP/apint-array.ll23
-rw-r--r--llvm/test/Transforms/SCCP/apint-basictest.ll16
-rw-r--r--llvm/test/Transforms/SCCP/apint-basictest2.ll17
-rw-r--r--llvm/test/Transforms/SCCP/apint-basictest3.ll23
-rw-r--r--llvm/test/Transforms/SCCP/apint-basictest4.ll25
-rw-r--r--llvm/test/Transforms/SCCP/apint-bigarray.ll23
-rw-r--r--llvm/test/Transforms/SCCP/apint-bigint.ll9
-rw-r--r--llvm/test/Transforms/SCCP/apint-bigint2.ll40
-rw-r--r--llvm/test/Transforms/SCCP/apint-ipsccp1.ll24
-rw-r--r--llvm/test/Transforms/SCCP/apint-ipsccp2.ll19
-rw-r--r--llvm/test/Transforms/SCCP/apint-ipsccp3.ll23
-rw-r--r--llvm/test/Transforms/SCCP/apint-ipsccp4.ll49
-rw-r--r--llvm/test/Transforms/SCCP/apint-load.ll36
-rw-r--r--llvm/test/Transforms/SCCP/apint-phi.ll19
-rw-r--r--llvm/test/Transforms/SCCP/apint-select.ll21
-rw-r--r--llvm/test/Transforms/SCCP/atomic-load-store.ll30
-rw-r--r--llvm/test/Transforms/SCCP/atomic.ll9
-rw-r--r--llvm/test/Transforms/SCCP/bitcast.ll9
-rw-r--r--llvm/test/Transforms/SCCP/calltest.ll31
-rw-r--r--llvm/test/Transforms/SCCP/comdat-ipo.ll28
-rw-r--r--llvm/test/Transforms/SCCP/constant-struct.ll72
-rw-r--r--llvm/test/Transforms/SCCP/crash.ll34
-rw-r--r--llvm/test/Transforms/SCCP/definite-initializer.ll11
-rw-r--r--llvm/test/Transforms/SCCP/dont-zap-return.ll24
-rw-r--r--llvm/test/Transforms/SCCP/global-alias-constprop.ll12
-rw-r--r--llvm/test/Transforms/SCCP/indirectbr.ll76
-rw-r--r--llvm/test/Transforms/SCCP/ip-constant-ranges.ll198
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-addr-taken.ll28
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-basic.ll273
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-branch-unresolved-undef.ll24
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-phi-one-pred-dead.ll41
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll56
-rw-r--r--llvm/test/Transforms/SCCP/ipsccp-ssa-copy-nested-conds.ll50
-rw-r--r--llvm/test/Transforms/SCCP/latticeval-invalidate.ll41
-rw-r--r--llvm/test/Transforms/SCCP/loadtest.ll46
-rw-r--r--llvm/test/Transforms/SCCP/logical-nuke.ll39
-rw-r--r--llvm/test/Transforms/SCCP/overdefined-div.ll32
-rw-r--r--llvm/test/Transforms/SCCP/pr27712.ll30
-rw-r--r--llvm/test/Transforms/SCCP/pr35357.ll24
-rw-r--r--llvm/test/Transforms/SCCP/preserve-analysis.ll34
-rw-r--r--llvm/test/Transforms/SCCP/return-zapped.ll62
-rw-r--r--llvm/test/Transforms/SCCP/retvalue-undef.ll32
-rw-r--r--llvm/test/Transforms/SCCP/sccptest.ll58
-rw-r--r--llvm/test/Transforms/SCCP/select.ll12
-rw-r--r--llvm/test/Transforms/SCCP/switch-multiple-undef.ll27
-rw-r--r--llvm/test/Transforms/SCCP/switch-undef-constantfoldterminator.ll47
-rw-r--r--llvm/test/Transforms/SCCP/switch.ll13
-rw-r--r--llvm/test/Transforms/SCCP/ub-shift.ll69
-rw-r--r--llvm/test/Transforms/SCCP/undef-resolve.ll182
-rw-r--r--llvm/test/Transforms/SCCP/vector-bitcast.ll20
67 files changed, 0 insertions, 2686 deletions
diff --git a/llvm/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll b/llvm/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll
deleted file mode 100644
index bb5b51d1bbb..00000000000
--- a/llvm/test/Transforms/SCCP/2002-05-02-MissSecondInst.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep sub
-
-define void @test3(i32, i32) {
- add i32 0, 0 ; <i32>:3 [#uses=0]
- sub i32 0, 4 ; <i32>:4 [#uses=0]
- ret void
-}
-
diff --git a/llvm/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll b/llvm/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
deleted file mode 100644
index f6198025b80..00000000000
--- a/llvm/test/Transforms/SCCP/2002-05-20-MissedIncomingValue.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; This test shows a case where SCCP is incorrectly eliminating the PHI node
-; because it thinks it has a constant 0 value, when it really doesn't.
-
-; RUN: opt < %s -sccp -S | grep phi
-
-define i32 @test(i32 %A, i1 %c) {
-bb1:
- br label %BB2
-BB2: ; preds = %BB4, %bb1
- %V = phi i32 [ 0, %bb1 ], [ %A, %BB4 ] ; <i32> [#uses=1]
- br label %BB3
-BB3: ; preds = %BB2
- br i1 %c, label %BB4, label %BB5
-BB4: ; preds = %BB3
- br label %BB2
-BB5: ; preds = %BB3
- ret i32 %V
-}
-
diff --git a/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll b/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
deleted file mode 100644
index f02a29379b8..00000000000
--- a/llvm/test/Transforms/SCCP/2002-05-21-InvalidSimplify.ll
+++ /dev/null
@@ -1,33 +0,0 @@
-; This test shows SCCP "proving" that the loop (from bb6 to 14) loops infinitely
-; this is in fact NOT the case, so the return should still be alive in the code
-; after sccp and CFG simplification have been performed.
-;
-; RUN: opt < %s -sccp -simplifycfg -S | \
-; RUN: grep ret
-
-define void @old_main() {
-bb3:
- br label %bb6
-bb6: ; preds = %bb14, %bb3
- %reg403 = phi i32 [ %reg155, %bb14 ], [ 0, %bb3 ] ; <i32> [#uses=1]
- %reg155 = add i32 %reg403, 1 ; <i32> [#uses=2]
- br label %bb11
-bb11: ; preds = %bb11, %bb6
- %reg407 = phi i32 [ %reg408, %bb11 ], [ 0, %bb6 ] ; <i32> [#uses=2]
- %reg408 = add i32 %reg407, 1 ; <i32> [#uses=1]
- %cond550 = icmp sle i32 %reg407, 1 ; <i1> [#uses=1]
- br i1 %cond550, label %bb11, label %bb12
-bb12: ; preds = %bb11
- br label %bb13
-bb13: ; preds = %bb13, %bb12
- %reg409 = phi i32 [ %reg410, %bb13 ], [ 0, %bb12 ] ; <i32> [#uses=1]
- %reg410 = add i32 %reg409, 1 ; <i32> [#uses=2]
- %cond552 = icmp sle i32 %reg410, 2 ; <i1> [#uses=1]
- br i1 %cond552, label %bb13, label %bb14
-bb14: ; preds = %bb13
- %cond553 = icmp sle i32 %reg155, 31 ; <i1> [#uses=1]
- br i1 %cond553, label %bb6, label %bb15
-bb15: ; preds = %bb14
- ret void
-}
-
diff --git a/llvm/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll b/llvm/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll
deleted file mode 100644
index 7b88a669ffb..00000000000
--- a/llvm/test/Transforms/SCCP/2002-08-30-GetElementPtrTest.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep %X
-
-@G = external global [40 x i32] ; <[40 x i32]*> [#uses=1]
-
-define i32* @test() {
- %X = getelementptr [40 x i32], [40 x i32]* @G, i64 0, i64 0 ; <i32*> [#uses=1]
- ret i32* %X
-}
-
diff --git a/llvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll b/llvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
deleted file mode 100644
index e5a1d679fc2..00000000000
--- a/llvm/test/Transforms/SCCP/2003-06-24-OverdefinedPHIValue.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: opt < %s -sccp -simplifycfg -S | \
-; RUN: not grep then:
-
-define void @cprop_test11(i32* %data.1) {
-entry:
- %tmp.1 = load i32, i32* %data.1 ; <i32> [#uses=3]
- %tmp.41 = icmp sgt i32 %tmp.1, 1 ; <i1> [#uses=1]
- br i1 %tmp.41, label %no_exit, label %loopexit
-no_exit: ; preds = %endif, %then, %entry
- %j.0 = phi i32 [ %j.0, %endif ], [ %i.0, %then ], [ 1, %entry ] ; <i32> [#uses=3]
- %i.0 = phi i32 [ %inc, %endif ], [ %inc1, %then ], [ 1, %entry ] ; <i32> [#uses=4]
- %tmp.8.not = icmp ne i32 %j.0, 0 ; <i1> [#uses=1]
- br i1 %tmp.8.not, label %endif, label %then
-then: ; preds = %no_exit
- %inc1 = add i32 %i.0, 1 ; <i32> [#uses=3]
- %tmp.42 = icmp slt i32 %inc1, %tmp.1 ; <i1> [#uses=1]
- br i1 %tmp.42, label %no_exit, label %loopexit
-endif: ; preds = %no_exit
- %inc = add i32 %i.0, 1 ; <i32> [#uses=3]
- %tmp.4 = icmp slt i32 %inc, %tmp.1 ; <i1> [#uses=1]
- br i1 %tmp.4, label %no_exit, label %loopexit
-loopexit: ; preds = %endif, %then, %entry
- %j.1 = phi i32 [ 1, %entry ], [ %j.0, %endif ], [ %i.0, %then ] ; <i32> [#uses=1]
- %i.1 = phi i32 [ 1, %entry ], [ %inc, %endif ], [ %inc1, %then ] ; <i32> [#uses=1]
- %tmp.17 = getelementptr i32, i32* %data.1, i64 1 ; <i32*> [#uses=1]
- store i32 %j.1, i32* %tmp.17
- %tmp.23 = getelementptr i32, i32* %data.1, i64 2 ; <i32*> [#uses=1]
- store i32 %i.1, i32* %tmp.23
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll b/llvm/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
deleted file mode 100644
index eb308afc0e6..00000000000
--- a/llvm/test/Transforms/SCCP/2003-08-26-InvokeHandling.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
-; RUN: opt < %s -sccp -S | grep phi
-
-declare void @foo()
-
-define i32 @test(i1 %cond) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
-Entry:
- br i1 %cond, label %Inv, label %Cont
-Inv: ; preds = %Entry
- invoke void @foo( )
- to label %Ok unwind label %LPad
-Ok: ; preds = %Inv
- br label %Cont
-LPad:
- %val = landingpad { i8*, i32 }
- catch i8* null
- br label %Cont
-Cont: ; preds = %Ok, %Inv, %Entry
- %X = phi i32 [ 0, %Entry ], [ 1, %Ok ], [ 0, %LPad ] ; <i32> [#uses=1]
- ret i32 %X
-}
-
-declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll b/llvm/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
deleted file mode 100644
index 47d9d835656..00000000000
--- a/llvm/test/Transforms/SCCP/2004-11-16-DeadInvoke.ll
+++ /dev/null
@@ -1,18 +0,0 @@
-; RUN: opt < %s -sccp -disable-output
-
-declare i32 @foo()
-
-define void @caller() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
- br i1 true, label %T, label %F
-F: ; preds = %0
- %X = invoke i32 @foo( )
- to label %T unwind label %LP ; <i32> [#uses=0]
-LP:
- %val = landingpad { i8*, i32 }
- catch i8* null
- br label %T
-T:
- ret void
-}
-
-declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll b/llvm/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
deleted file mode 100644
index c847b4eaca3..00000000000
--- a/llvm/test/Transforms/SCCP/2004-12-10-UndefBranchBug.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: opt < %s -sccp -S | grep "ret i32 1"
-
-; This function definitely returns 1, even if we don't know the direction
-; of the branch.
-
-define i32 @foo() {
- br i1 undef, label %T, label %T
-T: ; preds = %0, %0
- %X = add i32 0, 1 ; <i32> [#uses=1]
- ret i32 %X
-}
-
diff --git a/llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll b/llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll
deleted file mode 100644
index 30b7325dcdc..00000000000
--- a/llvm/test/Transforms/SCCP/2006-10-23-IPSCCP-Crash.ll
+++ /dev/null
@@ -1,103 +0,0 @@
-; RUN: opt < %s -sccp -disable-output
-; END.
-target datalayout = "E-p:32:32"
-target triple = "powerpc-unknown-linux-gnu"
- %struct.pat_list = type { i32, %struct.pat_list* }
-@JUMP = external global i32 ; <i32*> [#uses=1]
-@old_D_pat = external global [16 x i8] ; <[16 x i8]*> [#uses=0]
-
-define void @asearch1(i32 %D) {
-entry:
- %tmp80 = icmp ult i32 0, %D ; <i1> [#uses=1]
- br i1 %tmp80, label %bb647.preheader, label %cond_true81.preheader
-cond_true81.preheader: ; preds = %entry
- ret void
-bb647.preheader: ; preds = %entry
- %tmp3.i = call i32 @read( ) ; <i32> [#uses=1]
- %tmp6.i = add i32 %tmp3.i, 0 ; <i32> [#uses=1]
- %tmp653 = icmp sgt i32 %tmp6.i, 0 ; <i1> [#uses=1]
- br i1 %tmp653, label %cond_true654, label %UnifiedReturnBlock
-cond_true612: ; preds = %cond_true654
- ret void
-cond_next624: ; preds = %cond_true654
- ret void
-cond_true654: ; preds = %bb647.preheader
- br i1 undef, label %cond_true612, label %cond_next624
-UnifiedReturnBlock: ; preds = %bb647.preheader
- ret void
-}
-
-define void @bitap(i32 %D) {
-entry:
- %tmp29 = icmp eq i32 0, 0 ; <i1> [#uses=1]
- br i1 %tmp29, label %cond_next50, label %cond_next37
-cond_next37: ; preds = %entry
- ret void
-cond_next50: ; preds = %entry
- %tmp52 = icmp sgt i32 %D, 0 ; <i1> [#uses=1]
- br i1 %tmp52, label %cond_true53, label %cond_next71
-cond_true53: ; preds = %cond_next50
- %tmp54 = load i32, i32* @JUMP ; <i32> [#uses=1]
- %tmp55 = icmp eq i32 %tmp54, 1 ; <i1> [#uses=1]
- br i1 %tmp55, label %cond_true56, label %cond_next63
-cond_true56: ; preds = %cond_true53
- %tmp57 = bitcast i32 %D to i32 ; <i32> [#uses=1]
- call void @asearch1( i32 %tmp57 )
- ret void
-cond_next63: ; preds = %cond_true53
- ret void
-cond_next71: ; preds = %cond_next50
- ret void
-}
-
-declare i32 @read()
-
-define void @initial_value() {
-entry:
- ret void
-}
-
-define void @main() {
-entry:
- br label %cond_next252
-cond_next208: ; preds = %cond_true260
- %tmp229 = call i32 @atoi( ) ; <i32> [#uses=1]
- br label %cond_next252
-bb217: ; preds = %cond_true260
- ret void
-cond_next252: ; preds = %cond_next208, %entry
- %D.0.0 = phi i32 [ 0, %entry ], [ %tmp229, %cond_next208 ] ; <i32> [#uses=1]
- %tmp254 = getelementptr i8*, i8** null, i32 1 ; <i8**> [#uses=1]
- %tmp256 = load i8*, i8** %tmp254 ; <i8*> [#uses=1]
- %tmp258 = load i8, i8* %tmp256 ; <i8> [#uses=1]
- %tmp259 = icmp eq i8 %tmp258, 45 ; <i1> [#uses=1]
- br i1 %tmp259, label %cond_true260, label %bb263
-cond_true260: ; preds = %cond_next252
- %tmp205818 = icmp sgt i8 0, -1 ; <i1> [#uses=1]
- br i1 %tmp205818, label %cond_next208, label %bb217
-bb263: ; preds = %cond_next252
- %tmp265 = icmp eq i32 0, 0 ; <i1> [#uses=1]
- br i1 %tmp265, label %cond_next276, label %cond_true266
-cond_true266: ; preds = %bb263
- ret void
-cond_next276: ; preds = %bb263
- %tmp278 = icmp eq i32 0, 0 ; <i1> [#uses=1]
- br i1 %tmp278, label %cond_next298, label %cond_true279
-cond_true279: ; preds = %cond_next276
- ret void
-cond_next298: ; preds = %cond_next276
- call void @bitap( i32 %D.0.0 )
- ret void
-}
-
-declare i32 @atoi()
-
-define void @subset_pset() {
-entry:
- ret void
-}
-
-define void @strcmp() {
-entry:
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll b/llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll
deleted file mode 100644
index e077efdf6b1..00000000000
--- a/llvm/test/Transforms/SCCP/2006-12-04-PackedType.ll
+++ /dev/null
@@ -1,140 +0,0 @@
-; Test VectorType handling by SCCP.
-; SCCP ignores VectorTypes until PR 1034 is fixed
-;
-; RUN: opt < %s -sccp
-; END.
-
-target datalayout = "E-p:32:32"
-target triple = "powerpc-unknown-linux-gnu"
- %struct.GLDAlphaTest = type { float, i16, i8, i8 }
- %struct.GLDArrayRange = type { i8, i8, i8, i8 }
- %struct.GLDBlendMode = type { i16, i16, i16, i16, %struct.GLTColor4, i16, i16, i8, i8, i8, i8 }
- %struct.GLDBufferRec = type opaque
- %struct.GLDBufferstate = type { %struct.GLTDimensions, %struct.GLTDimensions, %struct.GLTFixedColor4, %struct.GLTFixedColor4, i8, i8, i8, i8, [2 x %struct.GLSBuffer], [4 x %struct.GLSBuffer], %struct.GLSBuffer, %struct.GLSBuffer, %struct.GLSBuffer, [4 x %struct.GLSBuffer*], %struct.GLSBuffer*, %struct.GLSBuffer*, %struct.GLSBuffer*, i8, i8 }
- %struct.GLDClearColor = type { double, %struct.GLTColor4, %struct.GLTColor4, float, i32 }
- %struct.GLDClipPlane = type { i32, [6 x %struct.GLTColor4] }
- %struct.GLDColorBuffer = type { i16, i16, [4 x i16] }
- %struct.GLDColorMatrix = type { [16 x float]*, %struct.GLDImagingColorScale }
- %struct.GLDContextRec = type { float, float, float, float, float, float, float, float, %struct.GLTColor4, %struct.GLTColor4, %struct.GLVMFPContext, %struct.GLDTextureMachine, %struct.GLGProcessor, %struct._GLVMConstants*, void (%struct.GLDContextRec*, i32, i32, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, i32)*, %struct._GLVMFunction*, void (%struct.GLDContextRec*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*)*, void (%struct.GLDContextRec*, %struct.GLDVertex*, %struct.GLDVertex*, %struct.GLDVertex*)*, %struct._GLVMFunction*, %struct._GLVMFunction*, %struct._GLVMFunction*, i32, i32, i32, float, float, float, i32, %struct.GLSDrawable, %struct.GLDFramebufferAttachment, %struct.GLDFormat, %struct.GLDBufferstate, %struct.GLDSharedRec*, %struct.GLDState*, %struct.GLDPluginState*, %struct.GLTDimensions, %struct.GLTColor4*, %struct.GLTColor4*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLVMFragmentAttribRec*, %struct.GLDPipelineProgramRec*, %struct.GLDStateProgramRec, %struct.GLVMTextures, { [4 x i8*], i8*, i8* }, [64 x float], %struct.GLDStippleData, i16, i8, i8, i32, %struct.GLDFramebufferRec*, i8, %struct.GLDQueryRec*, %struct.GLDQueryRec* }
- %struct.GLDConvolution = type { %struct.GLTColor4, %struct.GLDImagingColorScale, i16, i16, float*, i32, i32 }
- %struct.GLDDepthTest = type { i16, i16, i8, i8, i8, i8, double, double }
- %struct.GLDFogMode = type { %struct.GLTColor4, float, float, float, float, float, i16, i16, i16, i8, i8 }
- %struct.GLDFormat = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, i32 }
- %struct.GLDFramebufferAttachment = type { i32, i32, i32, i32, i32, i32 }
- %struct.GLDFramebufferData = type { [6 x %struct.GLDFramebufferAttachment], [4 x i16], i16, i16, i16, i16, i32 }
- %struct.GLDFramebufferRec = type { %struct.GLDFramebufferData*, %struct.GLDPluginFramebufferData*, %struct.GLDPixelFormat }
- %struct.GLDHintMode = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
- %struct.GLDHistogram = type { %struct.GLTFixedColor4*, i32, i16, i8, i8 }
- %struct.GLDImagingColorScale = type { { float, float }, { float, float }, { float, float }, { float, float } }
- %struct.GLDImagingSubset = type { %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDConvolution, %struct.GLDColorMatrix, %struct.GLDMinmax, %struct.GLDHistogram, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, %struct.GLDImagingColorScale, i32 }
- %struct.GLDLight = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTCoord3, float, float, float, float, float, %struct.GLTCoord3, float, float, float, float, float }
- %struct.GLDLightModel = type { %struct.GLTColor4, [8 x %struct.GLDLight], [2 x %struct.GLDMaterial], i32, i16, i16, i16, i8, i8, i8, i8, i8, i8 }
- %struct.GLDLightProduct = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4 }
- %struct.GLDLineMode = type { float, i32, i16, i16, i8, i8, i8, i8 }
- %struct.GLDLogicOp = type { i16, i8, i8 }
- %struct.GLDMaskMode = type { i32, [3 x i32], i8, i8, i8, i8, i8, i8, i8, i8 }
- %struct.GLDMaterial = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, float, float, float, float, [8 x %struct.GLDLightProduct], %struct.GLTColor4, [6 x i32], [2 x i32] }
- %struct.GLDMinmax = type { %struct.GLDMinmaxTable*, i16, i8, i8 }
- %struct.GLDMinmaxTable = type { %struct.GLTColor4, %struct.GLTColor4 }
- %struct.GLDMipmaplevel = type { [4 x i32], [4 x float], [4 x i32], [4 x i32], [4 x float], [4 x i32], [3 x i32], i32, float*, float*, float*, i32, i32, i8*, i16, i16, i16, i16 }
- %struct.GLDMultisample = type { float, i8, i8, i8, i8, i8, i8, i8, i8 }
- %struct.GLDPipelineProgramData = type { i16, i16, i32, %struct._PPStreamToken*, i64, %struct.GLDShaderSourceData*, %struct.GLTColor4*, i32 }
- %struct.GLDPipelineProgramRec = type { %struct.GLDPipelineProgramData*, %struct._PPStreamToken*, %struct._PPStreamToken*, %struct._GLVMFunction*, i32, i32, i32 }
- %struct.GLDPipelineProgramState = type { i8, i8, i8, i8, %struct.GLTColor4* }
- %struct.GLDPixelFormat = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
- %struct.GLDPixelMap = type { i32*, float*, float*, float*, float*, float*, float*, float*, float*, i32*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
- %struct.GLDPixelMode = type { float, float, %struct.GLDPixelStore, %struct.GLDPixelTransfer, %struct.GLDPixelMap, %struct.GLDImagingSubset, i32, i32 }
- %struct.GLDPixelPack = type { i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8 }
- %struct.GLDPixelStore = type { %struct.GLDPixelPack, %struct.GLDPixelPack }
- %struct.GLDPixelTransfer = type { float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float }
- %struct.GLDPluginFramebufferData = type { [6 x %struct.GLDTextureRec*], i32, i32 }
- %struct.GLDPluginProgramData = type { [3 x %struct.GLDPipelineProgramRec*], %struct.GLDBufferRec**, i32 }
- %struct.GLDPluginState = type { [16 x [5 x %struct.GLDTextureRec*]], [3 x %struct.GLDTextureRec*], [16 x %struct.GLDTextureRec*], [3 x %struct.GLDPipelineProgramRec*], %struct.GLDProgramRec*, %struct.GLDVertexArrayRec*, [16 x %struct.GLDBufferRec*], %struct.GLDFramebufferRec*, %struct.GLDFramebufferRec* }
- %struct.GLDPointMode = type { float, float, float, float, %struct.GLTCoord3, float, i8, i8, i8, i8, i16, i16, i32, i16, i16 }
- %struct.GLDPolygonMode = type { [128 x i8], float, float, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8 }
- %struct.GLDProgramData = type { i32, [16 x i32], i32, i32, i32, i32 }
- %struct.GLDProgramRec = type { %struct.GLDProgramData*, %struct.GLDPluginProgramData*, i32 }
- %struct.GLDQueryRec = type { i32, i32, %struct.GLDQueryRec* }
- %struct.GLDRect = type { i32, i32, i32, i32, i32, i32 }
- %struct.GLDRegisterCombiners = type { i8, i8, i8, i8, i32, [2 x %struct.GLTColor4], [8 x %struct.GLDRegisterCombinersPerStageState], %struct.GLDRegisterCombinersFinalStageState }
- %struct.GLDRegisterCombinersFinalStageState = type { i8, i8, i8, i8, [7 x %struct.GLDRegisterCombinersPerVariableState] }
- %struct.GLDRegisterCombinersPerPortionState = type { [4 x %struct.GLDRegisterCombinersPerVariableState], i8, i8, i8, i8, i16, i16, i16, i16, i16, i16 }
- %struct.GLDRegisterCombinersPerStageState = type { [2 x %struct.GLDRegisterCombinersPerPortionState], [2 x %struct.GLTColor4] }
- %struct.GLDRegisterCombinersPerVariableState = type { i16, i16, i16, i16 }
- %struct.GLDScissorTest = type { %struct.GLTFixedColor4, i8, i8, i8, i8 }
- %struct.GLDShaderSourceData = type { i32, i32, i8*, i32*, i32, i32, i8*, i32*, i8* }
- %struct.GLDSharedRec = type opaque
- %struct.GLDState = type { i16, i16, i32, i32, i32, [256 x %struct.GLTColor4], [128 x %struct.GLTColor4], %struct.GLDViewport, %struct.GLDTransform, %struct.GLDLightModel, i32*, i32, i32, i32, %struct.GLDAlphaTest, %struct.GLDBlendMode, %struct.GLDClearColor, %struct.GLDColorBuffer, %struct.GLDDepthTest, %struct.GLDArrayRange, %struct.GLDFogMode, %struct.GLDHintMode, %struct.GLDLineMode, %struct.GLDLogicOp, %struct.GLDMaskMode, %struct.GLDPixelMode, %struct.GLDPointMode, %struct.GLDPolygonMode, %struct.GLDScissorTest, i32, %struct.GLDStencilTest, [16 x %struct.GLDTextureMode], %struct.GLDArrayRange, [8 x %struct.GLDTextureCoordGen], %struct.GLDClipPlane, %struct.GLDMultisample, %struct.GLDRegisterCombiners, %struct.GLDArrayRange, %struct.GLDArrayRange, [3 x %struct.GLDPipelineProgramState], %struct.GLDTransformFeedback }
- %struct.GLDStateProgramRec = type { %struct.GLDPipelineProgramData*, %struct.GLDPipelineProgramRec* }
- %struct.GLDStencilTest = type { [3 x { i32, i32, i16, i16, i16, i16 }], i32, [4 x i8] }
- %struct.GLDStippleData = type { i32, i16, i16, [32 x [32 x i8]] }
- %struct.GLDTextureCoordGen = type { { i16, i16, %struct.GLTColor4, %struct.GLTColor4 }, { i16, i16, %struct.GLTColor4, %struct.GLTColor4 }, { i16, i16, %struct.GLTColor4, %struct.GLTColor4 }, { i16, i16, %struct.GLTColor4, %struct.GLTColor4 }, i8, i8, i8, i8 }
- %struct.GLDTextureGeomState = type { i16, i16, i16, i16, i16, i8, i8, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [6 x i16], [6 x i16] }
- %struct.GLDTextureLevel = type { i32, i32, i16, i16, i16, i8, i8, i16, i16, i16, i16, i8* }
- %struct.GLDTextureMachine = type { [8 x %struct.GLDTextureRec*], %struct.GLDTextureRec*, i8, i8, i8, i8 }
- %struct.GLDTextureMode = type { %struct.GLTColor4, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, float, float, float, i16, i16, i16, i16, i16, i16, [4 x i16], i8, i8, i8, i8, [3 x float], [4 x float], float, float }
- %struct.GLDTextureParamState = type { i16, i16, i16, i16, i16, i16, %struct.GLTColor4, float, float, float, float, i16, i16, i16, i16, float, i16, i8, i8, i32, i8* }
- %struct.GLDTextureRec = type { %struct.GLDTextureState*, i32, [2 x float], float, i32, float, float, float, float, float, float, %struct.GLDMipmaplevel*, %struct.GLDMipmaplevel*, i32, i32, i32, i32, i32, i32, %struct.GLDTextureParamState, i32, [2 x %struct._PPStreamToken] }
- %struct.GLDTextureState = type { i16, i16, i16, float, i32, i16, %struct.GLISWRSurface*, i8, i8, i8, i8, %struct.GLDTextureParamState, %struct.GLDTextureGeomState, %struct.GLDTextureLevel, [6 x [15 x %struct.GLDTextureLevel]] }
- %struct.GLDTransform = type { [24 x [16 x float]], [24 x [16 x float]], [16 x float], float, float, float, float, i32, float, i16, i16, i8, i8, i8, i8 }
- %struct.GLDTransformFeedback = type { i8, i8, i8, [16 x i32], [16 x i32] }
- %struct.GLDVertex = type { %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTColor4, %struct.GLTCoord3, float, %struct.GLTColor4, float, float, float, i8, i8, i8, i8, [4 x float], [2 x %struct.GLDMaterial*], i32, i32, [8 x %struct.GLTColor4] }
- %struct.GLDVertexArrayRec = type opaque
- %struct.GLDViewport = type { float, float, float, float, float, float, float, float, double, double, i32, i32, i32, i32, float, float, float, float }
- %struct.GLGColorTable = type { i32, i32, i32, i8* }
- %struct.GLGOperation = type { i8*, i8*, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, %struct.GLGColorTable, %struct.GLGColorTable, %struct.GLGColorTable }
- %struct.GLGProcessor = type { void (%struct.GLDPixelMode*, %struct.GLGOperation*, %struct._GLGFunctionKey*)*, %struct._GLVMFunction*, %struct._GLGFunctionKey* }
- %struct.GLISWRSurface = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8*, i8*, i8*, [4 x i8*], i32 }
- %struct.GLIWindow = type { i32, i32, i32 }
- %struct.GLSBuffer = type { i8* }
- %struct.GLSDrawable = type { %struct.GLSWindowRec* }
- %struct.GLSWindowRec = type { %struct.GLTDimensions, %struct.GLTDimensions, i32, i32, %struct.GLSDrawable, [2 x i8*], i8*, i8*, i8*, [4 x i8*], i32, i32, i32, i32, [4 x i32], i16, i16, i16, %struct.GLIWindow, i32, i32, i8*, i8* }
- %struct.GLTColor4 = type { float, float, float, float }
- %struct.GLTCoord3 = type { float, float, float }
- %struct.GLTDimensions = type { i32, i32 }
- %struct.GLTFixedColor4 = type { i32, i32, i32, i32 }
- %struct.GLVMFPContext = type { float, i32, i32, i32 }
- %struct.GLVMFragmentAttribRec = type { <4 x float>, <4 x float>, <4 x float>, <4 x float>, [8 x <4 x float>] }
- %struct.GLVMTextures = type { [8 x %struct.GLDTextureRec*] }
- %struct._GLGFunctionKey = type opaque
- %struct._GLVMConstants = type opaque
- %struct._GLVMFunction = type opaque
- %struct._PPStreamToken = type { { i16, i8, i8, i32 } }
-
-define void @gldLLVMVecPointRender(%struct.GLDContextRec* %ctx) {
-entry:
- %tmp.uip = getelementptr %struct.GLDContextRec, %struct.GLDContextRec* %ctx, i32 0, i32 22 ; <i32*> [#uses=1]
- %tmp = load i32, i32* %tmp.uip ; <i32> [#uses=3]
- %tmp91 = lshr i32 %tmp, 5 ; <i32> [#uses=1]
- %tmp92 = trunc i32 %tmp91 to i1 ; <i1> [#uses=1]
- br i1 %tmp92, label %cond_true93, label %cond_next116
-cond_true93: ; preds = %entry
- %tmp.upgrd.1 = getelementptr %struct.GLDContextRec, %struct.GLDContextRec* %ctx, i32 0, i32 31, i32 14 ; <i32*> [#uses=1]
- %tmp95 = load i32, i32* %tmp.upgrd.1 ; <i32> [#uses=1]
- %tmp95.upgrd.2 = sitofp i32 %tmp95 to float ; <float> [#uses=1]
- %tmp108 = fmul float undef, %tmp95.upgrd.2 ; <float> [#uses=1]
- br label %cond_next116
-cond_next116: ; preds = %cond_true93, %entry
- %point_size.2 = phi float [ %tmp108, %cond_true93 ], [ undef, %entry ] ; <float> [#uses=2]
- %tmp457 = fcmp olt float %point_size.2, 1.000000e+00 ; <i1> [#uses=1]
- %tmp460 = lshr i32 %tmp, 6 ; <i32> [#uses=1]
- %tmp461 = trunc i32 %tmp460 to i1 ; <i1> [#uses=1]
- br i1 %tmp457, label %cond_true458, label %cond_next484
-cond_true458: ; preds = %cond_next116
- br i1 %tmp461, label %cond_true462, label %cond_next487
-cond_true462: ; preds = %cond_true458
- %tmp26 = bitcast i32 %tmp to i32 ; <i32> [#uses=1]
- %tmp465 = and i32 %tmp26, 128 ; <i32> [#uses=1]
- %tmp466 = icmp eq i32 %tmp465, 0 ; <i1> [#uses=1]
- br i1 %tmp466, label %cond_true467, label %cond_next487
-cond_true467: ; preds = %cond_true462
- ret void
-cond_next484: ; preds = %cond_next116
- %tmp486 = fmul float %point_size.2, 5.000000e-01 ; <float> [#uses=1]
- br label %cond_next487
-cond_next487: ; preds = %cond_next484, %cond_true462, %cond_true458
- %radius.0 = phi float [ %tmp486, %cond_next484 ], [ 5.000000e-01, %cond_true458 ], [ 5.000000e-01, %cond_true462 ] ; <float> [#uses=2]
- %tmp494 = insertelement <4 x float> zeroinitializer, float %radius.0, i32 2 ; <<4 x float>> [#uses=1]
- %tmp495 = insertelement <4 x float> %tmp494, float %radius.0, i32 3 ; <<4 x float>> [#uses=0]
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/2006-12-19-UndefBug.ll b/llvm/test/Transforms/SCCP/2006-12-19-UndefBug.ll
deleted file mode 100644
index ede1a32c5f7..00000000000
--- a/llvm/test/Transforms/SCCP/2006-12-19-UndefBug.ll
+++ /dev/null
@@ -1,8 +0,0 @@
-; RUN: opt < %s -sccp -S | \
-; RUN: grep "ret i1 false"
-
-define i1 @foo() {
- %X = and i1 false, undef ; <i1> [#uses=1]
- ret i1 %X
-}
-
diff --git a/llvm/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll b/llvm/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll
deleted file mode 100644
index 7d29f6cabcb..00000000000
--- a/llvm/test/Transforms/SCCP/2007-05-16-InvokeCrash.ll
+++ /dev/null
@@ -1,45 +0,0 @@
-; RUN: opt < %s -sccp -disable-output
-; PR1431
-
-define void @_ada_bench() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
-entry:
- br label %cond_next
-cond_next: ; preds = %cond_next, %entry
- %indvar46 = phi i32 [ 0, %entry ], [ %indvar.next47, %cond_next ] ; <i32> [#uses=1]
- %indvar.next47 = add i32 %indvar46, 1 ; <i32> [#uses=2]
- %exitcond48 = icmp eq i32 %indvar.next47, 10000 ; <i1> [#uses=1]
- br i1 %exitcond48, label %cond_next40, label %cond_next
-cond_next40: ; preds = %cond_next40, %cond_next
- %indvar43 = phi i32 [ %indvar.next44, %cond_next40 ], [ 0, %cond_next ] ; <i32> [#uses=1]
- %indvar.next44 = add i32 %indvar43, 1 ; <i32> [#uses=2]
- %exitcond45 = icmp eq i32 %indvar.next44, 10000 ; <i1> [#uses=1]
- br i1 %exitcond45, label %cond_next53, label %cond_next40
-cond_next53: ; preds = %cond_next53, %cond_next40
- %indvar41 = phi i32 [ %indvar.next42, %cond_next53 ], [ 0, %cond_next40 ] ; <i32> [#uses=1]
- %indvar.next42 = add i32 %indvar41, 1 ; <i32> [#uses=2]
- %exitcond = icmp eq i32 %indvar.next42, 10000 ; <i1> [#uses=1]
- br i1 %exitcond, label %bb67, label %cond_next53
-bb67: ; preds = %cond_next53
- %tmp112 = invoke double @sin( double 5.000000e-01 )
- to label %bb114 unwind label %cleanup ; <double> [#uses=0]
-bb114: ; preds = %bb67
- %tmp147 = invoke double @log( double 5.000000e-01 )
- to label %bb149 unwind label %cleanup ; <double> [#uses=0]
-bb149: ; preds = %bb114
- %tmp175 = invoke double @sqrt( double 5.000000e-01 )
- to label %bb177 unwind label %cleanup ; <double> [#uses=0]
-bb177: ; preds = %bb149
- unreachable
-cleanup: ; preds = %bb149, %bb114, %bb67
- %val = landingpad { i8*, i32 }
- cleanup
- resume { i8*, i32 } %val
-}
-
-declare double @sin(double)
-
-declare double @log(double)
-
-declare double @sqrt(double)
-
-declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll b/llvm/test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll
deleted file mode 100644
index aa613dca5d1..00000000000
--- a/llvm/test/Transforms/SCCP/2008-01-27-UndefCorrelate.ll
+++ /dev/null
@@ -1,36 +0,0 @@
-; RUN: opt < %s -sccp -S | grep undef | count 1
-; PR1938
-
-define i32 @main() {
-entry:
- br label %bb
-
-bb:
- %indvar = phi i32 [ 0, %entry ], [ %k, %bb.backedge ]
- %k = add i32 %indvar, 1
- br i1 undef, label %cond_true, label %cond_false
-
-cond_true:
- %tmp97 = icmp slt i32 %k, 10
- br i1 %tmp97, label %bb.backedge, label %bb12
-
-bb.backedge:
- br label %bb
-
-cond_false:
- %tmp9 = icmp slt i32 %k, 10
- br i1 %tmp9, label %bb.backedge, label %bb12
-
-bb12:
- %tmp14 = icmp eq i32 %k, 10
- br i1 %tmp14, label %cond_next18, label %cond_true17
-
-cond_true17:
- tail call void @abort( )
- unreachable
-
-cond_next18:
- ret i32 0
-}
-
-declare void @abort()
diff --git a/llvm/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll b/llvm/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
deleted file mode 100644
index e7168dda089..00000000000
--- a/llvm/test/Transforms/SCCP/2008-04-22-multiple-ret-sccp.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: opt < %s -sccp -S | grep "ret i32 %Z"
-; rdar://5778210
-
-declare {i32, i32} @bar(i32 %A)
-
-define i32 @foo() {
- %X = call {i32, i32} @bar(i32 17)
- %Y = extractvalue {i32, i32} %X, 0
- %Z = add i32 %Y, %Y
- ret i32 %Z
-}
diff --git a/llvm/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll b/llvm/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll
deleted file mode 100644
index 4688643ebd5..00000000000
--- a/llvm/test/Transforms/SCCP/2008-05-23-UndefCallFold.ll
+++ /dev/null
@@ -1,14 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep "ret i32 undef"
-; PR2358
-target datalayout =
-"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
-target triple = "i686-pc-linux-gnu"
-
-define i32 @x(i32 %b) {
-entry:
- %val = call i32 @llvm.cttz.i32(i32 undef, i1 true)
- ret i32 %val
-}
-
-declare i32 @llvm.cttz.i32(i32, i1)
-
diff --git a/llvm/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll b/llvm/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll
deleted file mode 100644
index f3e54804f30..00000000000
--- a/llvm/test/Transforms/SCCP/2009-01-14-IPSCCP-Invoke.ll
+++ /dev/null
@@ -1,26 +0,0 @@
-; RUN: opt < %s -ipsccp -S | grep "ret i32 42"
-; RUN: opt < %s -ipsccp -S | grep "ret i32 undef"
-; PR3325
-
-define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
- %tmp1 = invoke i32 @f()
- to label %UnifiedReturnBlock unwind label %lpad
-
-lpad:
- %val = landingpad { i8*, i32 }
- cleanup
- unreachable
-
-UnifiedReturnBlock:
- ret i32 %tmp1
-}
-
-define internal i32 @f() {
- ret i32 42
-}
-
-declare i8* @__cxa_begin_catch(i8*) nounwind
-
-declare void @__cxa_end_catch()
-
-declare i32 @__gxx_personality_v0(...)
diff --git a/llvm/test/Transforms/SCCP/2009-05-27-VectorOperandZero.ll b/llvm/test/Transforms/SCCP/2009-05-27-VectorOperandZero.ll
deleted file mode 100644
index 1ac6bcd8b4e..00000000000
--- a/llvm/test/Transforms/SCCP/2009-05-27-VectorOperandZero.ll
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: opt < %s -sccp -disable-output
-; PR4277
-
-define i32 @main() nounwind {
-entry:
- %0 = tail call signext i8 (...) @sin() nounwind
- ret i32 0
-}
-
-declare signext i8 @sin(...)
diff --git a/llvm/test/Transforms/SCCP/apint-array.ll b/llvm/test/Transforms/SCCP/apint-array.ll
deleted file mode 100644
index eff6cc997e3..00000000000
--- a/llvm/test/Transforms/SCCP/apint-array.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: opt < %s -sccp -S | grep "ret i101 12"
-
-@Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,i101
--123456789000000, i101 0,i101 9123456789000000]
-
-define i101 @array()
-{
-Head:
- %A = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 1
-
- %B = load i101, i101* %A
- %C = icmp sge i101 %B, 1
- br i1 %C, label %True, label %False
-True:
- %D = and i101 %B, 1
- %E = trunc i101 %D to i32
- %F = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 %E
- %G = load i101, i101* %F
- br label %False
-False:
- %H = phi i101 [%G, %True], [-1, %Head]
- ret i101 %H
-}
diff --git a/llvm/test/Transforms/SCCP/apint-basictest.ll b/llvm/test/Transforms/SCCP/apint-basictest.ll
deleted file mode 100644
index f6ef1ab3f23..00000000000
--- a/llvm/test/Transforms/SCCP/apint-basictest.ll
+++ /dev/null
@@ -1,16 +0,0 @@
-; This is a basic sanity check for constant propagation. The add instruction
-; should be eliminated.
-
-; RUN: opt < %s -sccp -S | not grep add
-
-define i128 @test(i1 %B) {
- br i1 %B, label %BB1, label %BB2
-BB1:
- %Val = add i128 0, 1
- br label %BB3
-BB2:
- br label %BB3
-BB3:
- %Ret = phi i128 [%Val, %BB1], [2, %BB2]
- ret i128 %Ret
-}
diff --git a/llvm/test/Transforms/SCCP/apint-basictest2.ll b/llvm/test/Transforms/SCCP/apint-basictest2.ll
deleted file mode 100644
index ad8b4a460cc..00000000000
--- a/llvm/test/Transforms/SCCP/apint-basictest2.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; This is a basic sanity check for constant propagation. The add instruction
-; and phi instruction should be eliminated.
-
-; RUN: opt < %s -sccp -S | not grep phi
-; RUN: opt < %s -sccp -S | not grep add
-
-define i128 @test(i1 %B) {
- br i1 %B, label %BB1, label %BB2
-BB1:
- %Val = add i128 0, 1
- br label %BB3
-BB2:
- br label %BB3
-BB3:
- %Ret = phi i128 [%Val, %BB1], [1, %BB2]
- ret i128 %Ret
-}
diff --git a/llvm/test/Transforms/SCCP/apint-basictest3.ll b/llvm/test/Transforms/SCCP/apint-basictest3.ll
deleted file mode 100644
index b8fcca6fda9..00000000000
--- a/llvm/test/Transforms/SCCP/apint-basictest3.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; This is a basic sanity check for constant propagation. It tests the basic
-; arithmatic operations.
-
-
-; RUN: opt < %s -sccp -S | not grep mul
-; RUN: opt < %s -sccp -S | not grep umod
-
-define i128 @test(i1 %B) {
- br i1 %B, label %BB1, label %BB2
-BB1:
- %t1 = add i128 0, 1
- %t2 = sub i128 0, %t1
- %t3 = mul i128 %t2, -1
- br label %BB3
-BB2:
- %f1 = udiv i128 -1, 1
- %f2 = add i128 %f1, 1
- %f3 = urem i128 %f2, 2121
- br label %BB3
-BB3:
- %Ret = phi i128 [%t3, %BB1], [%f3, %BB2]
- ret i128 %Ret
-}
diff --git a/llvm/test/Transforms/SCCP/apint-basictest4.ll b/llvm/test/Transforms/SCCP/apint-basictest4.ll
deleted file mode 100644
index 572f97c572e..00000000000
--- a/llvm/test/Transforms/SCCP/apint-basictest4.ll
+++ /dev/null
@@ -1,25 +0,0 @@
-; This is a basic sanity check for constant propagation. It tests the basic
-; logic operations.
-
-
-; RUN: opt < %s -sccp -S | not grep and
-; RUN: opt < %s -sccp -S | not grep trunc
-; RUN: opt < %s -sccp -S | grep "ret i100 -1"
-
-define i100 @test(i133 %A) {
- %B = and i133 0, %A
- %C = icmp sgt i133 %B, 0
- br i1 %C, label %BB1, label %BB2
-BB1:
- %t3 = xor i133 %B, -1
- %t4 = trunc i133 %t3 to i100
- br label %BB3
-BB2:
- %f1 = or i133 -1, %A
- %f2 = lshr i133 %f1, 33
- %f3 = trunc i133 %f2 to i100
- br label %BB3
-BB3:
- %Ret = phi i100 [%t4, %BB1], [%f3, %BB2]
- ret i100 %Ret
-}
diff --git a/llvm/test/Transforms/SCCP/apint-bigarray.ll b/llvm/test/Transforms/SCCP/apint-bigarray.ll
deleted file mode 100644
index e0231997f1b..00000000000
--- a/llvm/test/Transforms/SCCP/apint-bigarray.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep %X
-
-@G = global [1000000 x i10000] zeroinitializer
-
-define internal i10000* @test(i10000 %Arg) {
- %X = getelementptr [1000000 x i10000], [1000000 x i10000]* @G, i32 0, i32 999
- store i10000 %Arg, i10000* %X
- ret i10000* %X
-}
-
-define i10000 @caller()
-{
- %Y = call i10000* @test(i10000 -1)
- %Z = load i10000, i10000* %Y
- ret i10000 %Z
-}
-
-define i10000 @caller2()
-{
- %Y = call i10000* @test(i10000 1)
- %Z = load i10000, i10000* %Y
- ret i10000 %Z
-}
diff --git a/llvm/test/Transforms/SCCP/apint-bigint.ll b/llvm/test/Transforms/SCCP/apint-bigint.ll
deleted file mode 100644
index 36a96c33571..00000000000
--- a/llvm/test/Transforms/SCCP/apint-bigint.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep xor
-
-define i11129 @test1() {
- %B = shl i11129 1, 11128
- %C = sub i11129 %B, 1
- %D = xor i11129 %B, %C
-
- ret i11129 %D
-}
diff --git a/llvm/test/Transforms/SCCP/apint-bigint2.ll b/llvm/test/Transforms/SCCP/apint-bigint2.ll
deleted file mode 100644
index 5277d9fa5c6..00000000000
--- a/llvm/test/Transforms/SCCP/apint-bigint2.ll
+++ /dev/null
@@ -1,40 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-@Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12,
- i101 -123456789000000, i101 0,i101 9123456789000000]
-
-; CHECK-LABEL: @array
-; CHECK-NEXT: ret i101 123456789000000
-define i101 @array() {
- %A = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 1
- %B = load i101, i101* %A
- %D = and i101 %B, 1
- %DD = or i101 %D, 1
- %E = trunc i101 %DD to i32
- %F = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 %E
- %G = load i101, i101* %F
-
- ret i101 %G
-}
-
-; CHECK-LABEL: @large_aggregate
-; CHECK-NEXT: ret i101 undef
-define i101 @large_aggregate() {
- %B = load i101, i101* undef
- %D = and i101 %B, 1
- %DD = or i101 %D, 1
- %F = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 5
- %G = getelementptr i101, i101* %F, i101 %DD
- %L3 = load i101, i101* %G
- ret i101 %L3
-}
-
-; CHECK-LABEL: @index_too_large
-; CHECK-NEXT: store i101* getelementptr (i101, i101* getelementptr ([6 x i101], [6 x i101]* @Y, i32 0, i32 -1), i101 9224497936761618431), i101** undef
-; CHECK-NEXT: ret void
-define void @index_too_large() {
- %ptr1 = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 -1
- %ptr2 = getelementptr i101, i101* %ptr1, i101 9224497936761618431
- store i101* %ptr2, i101** undef
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/apint-ipsccp1.ll b/llvm/test/Transforms/SCCP/apint-ipsccp1.ll
deleted file mode 100644
index f6f18fe66f8..00000000000
--- a/llvm/test/Transforms/SCCP/apint-ipsccp1.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: opt < %s -ipsccp -S | grep -v "ret i512 undef" | \
-; RUN: grep "ret i8 2"
-
-define internal i512 @test(i1 %B) {
- br i1 %B, label %BB1, label %BB2
-BB1:
- %Val = add i512 0, 1
- br label %BB3
-BB2:
- br label %BB3
-BB3:
- %Ret = phi i512 [%Val, %BB1], [2, %BB2]
- ret i512 %Ret
-}
-
-define i8 @caller()
-{
- %t1 = and i2 2, 1
- %t11 = trunc i2 %t1 to i1
- %t2 = call i512 @test(i1 %t11)
- %t3 = trunc i512 %t2 to i8
- ret i8 %t3
-}
-
diff --git a/llvm/test/Transforms/SCCP/apint-ipsccp2.ll b/llvm/test/Transforms/SCCP/apint-ipsccp2.ll
deleted file mode 100644
index 834cca48848..00000000000
--- a/llvm/test/Transforms/SCCP/apint-ipsccp2.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: opt < %s -ipsccp -S | grep -v "ret i101 0" | \
-; RUN: grep -v "ret i101 undef" | not grep ret
-
-
-define internal i101 @bar(i101 %A) {
- %x = icmp eq i101 %A, 0
- br i1 %x, label %T, label %F
-T:
- %B = call i101 @bar(i101 0)
- ret i101 0
-F: ; unreachable
- %C = call i101 @bar(i101 1)
- ret i101 %C
-}
-
-define i101 @foo() {
- %X = call i101 @bar(i101 0)
- ret i101 %X
-}
diff --git a/llvm/test/Transforms/SCCP/apint-ipsccp3.ll b/llvm/test/Transforms/SCCP/apint-ipsccp3.ll
deleted file mode 100644
index c99ae5820b2..00000000000
--- a/llvm/test/Transforms/SCCP/apint-ipsccp3.ll
+++ /dev/null
@@ -1,23 +0,0 @@
-; RUN: opt < %s -ipsccp -S | not grep global
-
-@G = internal global i66 undef
-
-
-
-define void @foo() {
- %X = load i66, i66* @G
- store i66 %X, i66* @G
- ret void
-}
-
-define i66 @bar() {
- %V = load i66, i66* @G
- %C = icmp eq i66 %V, 17
- br i1 %C, label %T, label %F
-T:
- store i66 17, i66* @G
- ret i66 %V
-F:
- store i66 123, i66* @G
- ret i66 0
-}
diff --git a/llvm/test/Transforms/SCCP/apint-ipsccp4.ll b/llvm/test/Transforms/SCCP/apint-ipsccp4.ll
deleted file mode 100644
index be06d03f391..00000000000
--- a/llvm/test/Transforms/SCCP/apint-ipsccp4.ll
+++ /dev/null
@@ -1,49 +0,0 @@
-; This test makes sure that these instructions are properly constant propagated.
-
-; RUN: opt < %s -ipsccp -S | not grep load
-; RUN: opt < %s -ipsccp -S | not grep add
-; RUN: opt < %s -ipsccp -S | not grep phi
-
-
-@Y = constant [2 x { i212, float }] [ { i212, float } { i212 12, float 1.0 },
- { i212, float } { i212 37, float 2.0 } ]
-
-define internal float @test2() {
- %A = getelementptr [2 x { i212, float}], [2 x { i212, float}]* @Y, i32 0, i32 1, i32 1
- %B = load float, float* %A
- ret float %B
-}
-
-define internal float @test3() {
- %A = getelementptr [2 x { i212, float}], [2 x { i212, float}]* @Y, i32 0, i32 0, i32 1
- %B = load float, float* %A
- ret float %B
-}
-
-define internal float @test()
-{
- %A = call float @test2()
- %B = call float @test3()
-
- %E = fdiv float %B, %A
- ret float %E
-}
-
-define float @All()
-{
- %A = call float @test()
- %B = fcmp oge float %A, 1.0
- br i1 %B, label %T, label %F
-T:
- %C = fadd float %A, 1.0
- br label %exit
-F:
- %D = fadd float %A, 2.0
- br label %exit
-exit:
- %E = phi float [%C, %T], [%D, %F]
- ret float %E
-}
-
-
-
diff --git a/llvm/test/Transforms/SCCP/apint-load.ll b/llvm/test/Transforms/SCCP/apint-load.ll
deleted file mode 100644
index 17506fc043c..00000000000
--- a/llvm/test/Transforms/SCCP/apint-load.ll
+++ /dev/null
@@ -1,36 +0,0 @@
-; This test makes sure that these instructions are properly constant propagated.
-
-; RUN: opt < %s -ipsccp -S | not grep load
-; RUN: opt < %s -ipsccp -S | not grep fdiv
-
-@X = constant i212 42
-@Y = constant [2 x { i212, float }] [ { i212, float } { i212 12, float 1.0 },
- { i212, float } { i212 37, float 0x3FF3B2FEC0000000 } ]
-define i212 @test1() {
- %B = load i212, i212* @X
- ret i212 %B
-}
-
-define internal float @test2() {
- %A = getelementptr [2 x { i212, float}], [2 x { i212, float}]* @Y, i32 0, i32 1, i32 1
- %B = load float, float* %A
- ret float %B
-}
-
-define internal i212 @test3() {
- %A = getelementptr [2 x { i212, float}], [2 x { i212, float}]* @Y, i32 0, i32 0, i32 0
- %B = load i212, i212* %A
- ret i212 %B
-}
-
-define float @All()
-{
- %A = call float @test2()
- %B = call i212 @test3()
- %C = mul i212 %B, -1234567
- %D = sitofp i212 %C to float
- %E = fdiv float %A, %D
- ret float %E
-}
-
-
diff --git a/llvm/test/Transforms/SCCP/apint-phi.ll b/llvm/test/Transforms/SCCP/apint-phi.ll
deleted file mode 100644
index 50f0d1aeccb..00000000000
--- a/llvm/test/Transforms/SCCP/apint-phi.ll
+++ /dev/null
@@ -1,19 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep phi
-
-define i999 @test(i999%A, i1 %c) {
-bb1:
- br label %BB2
-BB2:
- %V = phi i999 [2, %bb1], [%A, %BB4]
- br label %BB3
-
-BB3:
- %E = trunc i999 %V to i1
- %F = and i1 %E, %c
- br i1 %F, label %BB4, label %BB5
-BB4:
- br label %BB2
-
-BB5:
- ret i999 %V
-}
diff --git a/llvm/test/Transforms/SCCP/apint-select.ll b/llvm/test/Transforms/SCCP/apint-select.ll
deleted file mode 100644
index 893331ea986..00000000000
--- a/llvm/test/Transforms/SCCP/apint-select.ll
+++ /dev/null
@@ -1,21 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep select
-
-@A = constant i32 10
-
-define i712 @test1() {
- %P = getelementptr i32, i32* @A, i32 0
- %B = ptrtoint i32* %P to i64
- %BB = and i64 %B, undef
- %C = icmp sge i64 %BB, 0
- %X = select i1 %C, i712 0, i712 1
- ret i712 %X
-}
-
-
-
-define i712 @test2(i1 %C) {
- %X = select i1 %C, i712 0, i712 undef
- ret i712 %X
-}
-
-
diff --git a/llvm/test/Transforms/SCCP/atomic-load-store.ll b/llvm/test/Transforms/SCCP/atomic-load-store.ll
deleted file mode 100644
index 45b5d7c80fe..00000000000
--- a/llvm/test/Transforms/SCCP/atomic-load-store.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-
-; This transformation is safe for atomic loads and stores; check that it works.
-
-@G = internal global i32 17
-@C = internal constant i32 222
-
-define i32 @test1() {
- %V = load atomic i32, i32* @G seq_cst, align 4
- %C = icmp eq i32 %V, 17
- br i1 %C, label %T, label %F
-T:
- store atomic i32 17, i32* @G seq_cst, align 4
- ret i32 %V
-F:
- store atomic i32 123, i32* @G seq_cst, align 4
- ret i32 0
-}
-; CHECK-LABEL: define i32 @test1(
-; CHECK-NOT: store
-; CHECK: ret i32 17
-
-define i32 @test2() {
- %V = load atomic i32, i32* @C seq_cst, align 4
- ret i32 %V
-}
-
-; CHECK-LABEL: define i32 @test2(
-; CHECK-NOT: load
-; CHECK: ret i32 222
diff --git a/llvm/test/Transforms/SCCP/atomic.ll b/llvm/test/Transforms/SCCP/atomic.ll
deleted file mode 100644
index 60d4896ec2b..00000000000
--- a/llvm/test/Transforms/SCCP/atomic.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-define i1 @test_cmpxchg(i32* %addr, i32 %desired, i32 %new) {
-; CHECK-LABEL: @test_cmpxchg
-; CHECK: cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
- %val = cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst seq_cst
- %res = extractvalue { i32, i1 } %val, 1
- ret i1 %res
-}
diff --git a/llvm/test/Transforms/SCCP/bitcast.ll b/llvm/test/Transforms/SCCP/bitcast.ll
deleted file mode 100644
index 285823512e5..00000000000
--- a/llvm/test/Transforms/SCCP/bitcast.ll
+++ /dev/null
@@ -1,9 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-
-define i128 @vector_to_int_cast() {
- %A = bitcast <4 x i32> <i32 1073741824, i32 1073741824, i32 1073741824, i32 1073741824> to i128
- ret i128 %A
-}
-
-; CHECK: define i128 @vector_to_int_cast(
-; CHECK-NEXT: ret i128 85070591750041656499021422275829170176
diff --git a/llvm/test/Transforms/SCCP/calltest.ll b/llvm/test/Transforms/SCCP/calltest.ll
deleted file mode 100644
index a6c2606cb19..00000000000
--- a/llvm/test/Transforms/SCCP/calltest.ll
+++ /dev/null
@@ -1,31 +0,0 @@
-; RUN: opt < %s -sccp -loop-deletion -simplifycfg -S | FileCheck %s
-
-declare double @sqrt(double) readnone nounwind
-%empty = type {}
-declare %empty @has_side_effects()
-
-define double @test_0(i32 %param) {
-; CHECK-LABEL: @test_0(
-; CHECK-NOT: br
-entry:
-; No matter how hard you try, sqrt(1.0) is always 1.0. This allows the
-; optimizer to delete this loop.
-
- br label %Loop
-Loop: ; preds = %Loop, %entry
- %I2 = phi i32 [ 0, %entry ], [ %I3, %Loop ] ; <i32> [#uses=1]
- %V = phi double [ 1.000000e+00, %entry ], [ %V2, %Loop ] ; <double> [#uses=2]
- %V2 = call double @sqrt( double %V ) ; <double> [#uses=1]
- %I3 = add i32 %I2, 1 ; <i32> [#uses=2]
- %tmp.7 = icmp ne i32 %I3, %param ; <i1> [#uses=1]
- br i1 %tmp.7, label %Loop, label %Exit
-Exit: ; preds = %Loop
- ret double %V
-}
-
-define i32 @test_1() {
-; CHECK-LABEL: @test_1(
-; CHECK: call %empty @has_side_effects()
- %1 = call %empty @has_side_effects()
- ret i32 0
-}
diff --git a/llvm/test/Transforms/SCCP/comdat-ipo.ll b/llvm/test/Transforms/SCCP/comdat-ipo.ll
deleted file mode 100644
index 618075fd5e3..00000000000
--- a/llvm/test/Transforms/SCCP/comdat-ipo.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-
-; See PR26774
-
-define i32 @baz() {
- ret i32 10
-}
-
-; We can const-prop @baz's return value *into* @foo, but cannot
-; constprop @foo's return value into bar.
-
-define linkonce_odr i32 @foo() {
-; CHECK-LABEL: @foo(
-; CHECK-NEXT: %val = call i32 @baz()
-; CHECK-NEXT: ret i32 10
-
- %val = call i32 @baz()
- ret i32 %val
-}
-
-define i32 @bar() {
-; CHECK-LABEL: @bar(
-; CHECK-NEXT: %val = call i32 @foo()
-; CHECK-NEXT: ret i32 %val
-
- %val = call i32 @foo()
- ret i32 %val
-}
diff --git a/llvm/test/Transforms/SCCP/constant-struct.ll b/llvm/test/Transforms/SCCP/constant-struct.ll
deleted file mode 100644
index 2b33d569167..00000000000
--- a/llvm/test/Transforms/SCCP/constant-struct.ll
+++ /dev/null
@@ -1,72 +0,0 @@
-; Test that constant structs are folded.
-; RUN: opt %s -sccp -S | FileCheck %s
-
-define internal {i64} @struct1() {
- %a = insertvalue {i64} undef, i64 24, 0
- ret {i64} %a
-}
-
-; CHECK: define internal { i64 } @struct1() {
-; CHECK-NEXT: ret { i64 } { i64 24 }
-; CHECK-NEXT: }
-
-define internal {i64, i64} @struct2() {
- %a = insertvalue {i64, i64} undef, i64 24, 0
- ret {i64, i64} %a
-}
-
-; CHECK: define internal { i64, i64 } @struct2() {
-; CHECK-NEXT: ret { i64, i64 } { i64 24, i64 undef }
-; CHECK-NEXT: }
-
-define internal {i64, i64, i64} @struct3(i64 %x) {
- %a = insertvalue {i64, i64, i64} undef, i64 24, 0
- %b = insertvalue {i64, i64, i64} %a, i64 36, 1
- %c = insertvalue {i64, i64, i64} %b, i64 %x, 2
- ret {i64, i64, i64} %c
-}
-
-; CHECK: define internal { i64, i64, i64 } @struct3(i64 %x) {
-; CHECK-NEXT: %c = insertvalue { i64, i64, i64 } { i64 24, i64 36, i64 undef }, i64 %x, 2
-; CHECK-NEXT: ret { i64, i64, i64 } %c
-; CHECK-NEXT: }
-
-; Test(s) for overdefined values.
-define internal {i64, i32} @struct4(i32 %x) {
- %a = insertvalue {i64, i32} {i64 12, i32 24}, i32 %x, 1
- ret {i64, i32} %a
-}
-
-; CHECK: define internal { i64, i32 } @struct4(i32 %x) {
-; CHECK-NEXT: %a = insertvalue { i64, i32 } { i64 12, i32 24 }, i32 %x, 1
-; CHECK-NEXT: ret { i64, i32 } %a
-; CHECK-NEXT: }
-
-define internal {i32} @struct5(i32 %x) {
- %a = insertvalue {i32} undef, i32 %x, 0
- ret {i32} %a
-}
-
-; CHECK: define internal { i32 } @struct5(i32 %x) {
-; CHECK-NEXT: %a = insertvalue { i32 } undef, i32 %x, 0
-; CHECK-NEXT: ret { i32 } %a
-; CHECK-NEXT: }
-
-
-define internal {i32} @struct6({i32} %x) {
- %a = insertvalue {i32} %x, i32 12, 0
- ret {i32} %a
-}
-
-; CHECK: define internal { i32 } @struct6({ i32 } %x) {
-; CHECK-NEXT: ret { i32 } { i32 12 }
-; CHECK-NEXT: }
-
-define internal {i16} @struct7() {
- %a = insertvalue {i16} {i16 4}, i16 7, 0
- ret {i16} %a
-}
-
-; CHECK: define internal { i16 } @struct7() {
-; CHECK-NEXT: ret { i16 } { i16 7 }
-; CHECK-NEXT: }
diff --git a/llvm/test/Transforms/SCCP/crash.ll b/llvm/test/Transforms/SCCP/crash.ll
deleted file mode 100644
index 3ec1fd21745..00000000000
--- a/llvm/test/Transforms/SCCP/crash.ll
+++ /dev/null
@@ -1,34 +0,0 @@
-; RUN: opt -sccp -S < %s
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-apple-darwin10.0"
-
-define void @test1(i8 %arg) {
-entry:
- br i1 undef, label %return, label %bb
-
-bb:
- br label %bb34
-
-bb23:
- %c = icmp eq i8 %arg, undef
- br i1 %c, label %bb34, label %bb23
-
-bb34:
- %Kind.1 = phi i32 [ undef, %bb ], [ %ins174, %bb23 ]
- %mask173 = or i32 %Kind.1, 7
- %ins174 = and i32 %mask173, -249
- br label %bb23
-
-return:
- ret void
-}
-
-define i32 @test2([4 x i32] %A) {
- %B = extractvalue [4 x i32] %A, 1
- ret i32 %B
-}
-
-define x86_mmx @test3() {
- %load = load x86_mmx, x86_mmx* null
- ret x86_mmx %load
-}
diff --git a/llvm/test/Transforms/SCCP/definite-initializer.ll b/llvm/test/Transforms/SCCP/definite-initializer.ll
deleted file mode 100644
index a2c4521e07c..00000000000
--- a/llvm/test/Transforms/SCCP/definite-initializer.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; RUN: opt -S -ipsccp < %s | FileCheck %s
-@d = internal externally_initialized global i32 0, section ".openbsd.randomdata", align 4
-
-; CHECK-LABEL: @test1(
-define i32 @test1() {
-entry:
- %load = load i32, i32* @d, align 4
- ret i32 %load
-; CHECK: %[[load:.*]] = load i32, i32* @d, align 4
-; CHECK: ret i32 %[[load]]
-}
diff --git a/llvm/test/Transforms/SCCP/dont-zap-return.ll b/llvm/test/Transforms/SCCP/dont-zap-return.ll
deleted file mode 100644
index c5345309cea..00000000000
--- a/llvm/test/Transforms/SCCP/dont-zap-return.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: opt -ipsccp < %s -S | FileCheck %s
-
-define internal {i32, i32} @identity(i32 %patatino) {
- %foo = insertvalue {i32, i32} {i32 1, i32 undef}, i32 %patatino, 1
- ret {i32, i32} %foo
-}
-
-; Check that the return value is not transformed to undef
-; CHECK: define internal { i32, i32 } @identity(i32 %patatino) {
-; CHECK-NEXT: %foo = insertvalue { i32, i32 } { i32 1, i32 undef }, i32 %patatino, 1
-; CHECK-NEXT: ret { i32, i32 } %foo
-; CHECK-NEXT: }
-
-
-define {i32, i32} @caller(i32 %pat) {
- %S1 = call {i32, i32} @identity(i32 %pat)
- ret {i32, i32} %S1
-}
-
-; Check that we don't invent values and propagate them.
-; CHECK: define { i32, i32 } @caller(i32 %pat) {
-; CHECK-NEXT: %S1 = call { i32, i32 } @identity(i32 %pat)
-; CHECK-NEXT: ret { i32, i32 } %S1
-; CHECK-NEXT: }
diff --git a/llvm/test/Transforms/SCCP/global-alias-constprop.ll b/llvm/test/Transforms/SCCP/global-alias-constprop.ll
deleted file mode 100644
index 8eac3ac1805..00000000000
--- a/llvm/test/Transforms/SCCP/global-alias-constprop.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-; RUN: opt < %s -passes=sccp -S | FileCheck %s
-
-@0 = private unnamed_addr constant [2 x i32] [i32 -1, i32 1]
-@"\01??_7A@@6B@" = unnamed_addr alias i32, getelementptr inbounds ([2 x i32], [2 x i32]* @0, i32 0, i32 1)
-
-; CHECK: ret i32 1
-
-define i32 @main() {
- %a = load i32, i32* @"\01??_7A@@6B@"
- ret i32 %a
-}
diff --git a/llvm/test/Transforms/SCCP/indirectbr.ll b/llvm/test/Transforms/SCCP/indirectbr.ll
deleted file mode 100644
index b977961ca49..00000000000
--- a/llvm/test/Transforms/SCCP/indirectbr.ll
+++ /dev/null
@@ -1,76 +0,0 @@
-; RUN: opt -S -sccp < %s | FileCheck %s
-
-declare void @BB0_f()
-declare void @BB1_f()
-
-; Make sure we can eliminate what is in BB0 as we know that the indirectbr is going to BB1.
-;
-; CHECK-LABEL: define void @indbrtest1(
-; CHECK-NOT: call void @BB0_f()
-; CHECK: ret void
-define void @indbrtest1() {
-entry:
- indirectbr i8* blockaddress(@indbrtest1, %BB1), [label %BB0, label %BB1]
-BB0:
- call void @BB0_f()
- br label %BB1
-BB1:
- call void @BB1_f()
- ret void
-}
-
-; Make sure we can eliminate what is in BB0 as we know that the indirectbr is going to BB1
-; by looking through the casts. The casts should be folded away when they are visited
-; before the indirectbr instruction.
-;
-; CHECK-LABEL: define void @indbrtest2(
-; CHECK-NOT: call void @BB0_f()
-; CHECK: ret void
-define void @indbrtest2() {
-entry:
- %a = ptrtoint i8* blockaddress(@indbrtest2, %BB1) to i64
- %b = inttoptr i64 %a to i8*
- %c = bitcast i8* %b to i8*
- indirectbr i8* %b, [label %BB0, label %BB1]
-BB0:
- call void @BB0_f()
- br label %BB1
-BB1:
- call void @BB1_f()
- ret void
-}
-
-; Make sure we can not eliminate BB0 as we do not know the target of the indirectbr.
-;
-; CHECK-LABEL: define void @indbrtest3(
-; CHECK: call void @BB0_f()
-; CHECK: ret void
-define void @indbrtest3(i8** %Q) {
-entry:
- %t = load i8*, i8** %Q
- indirectbr i8* %t, [label %BB0, label %BB1]
-BB0:
- call void @BB0_f()
- br label %BB1
-BB1:
- call void @BB1_f()
- ret void
-}
-
-; Make sure we eliminate BB1 as we pick the first successor on undef.
-;
-; CHECK-LABEL: define void @indbrtest4(
-; CHECK: call void @BB0_f()
-; CHECK: ret void
-define void @indbrtest4(i8** %Q) {
-entry:
- indirectbr i8* undef, [label %BB0, label %BB1]
-BB0:
- call void @BB0_f()
- br label %BB1
-BB1:
- call void @BB1_f()
- ret void
-}
-
-
diff --git a/llvm/test/Transforms/SCCP/ip-constant-ranges.ll b/llvm/test/Transforms/SCCP/ip-constant-ranges.ll
deleted file mode 100644
index 704ea97179b..00000000000
--- a/llvm/test/Transforms/SCCP/ip-constant-ranges.ll
+++ /dev/null
@@ -1,198 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-
-; Constant range for %a is [1, 48) and for %b is [301, 1000)
-; CHECK-LABEL: f1
-; CHECK: ret i32 undef
-define internal i32 @f1(i32 %a, i32 %b) {
-entry:
- %cmp.a = icmp sgt i32 %a, 300
- %cmp.b = icmp sgt i32 %b, 300
- %cmp.a2 = icmp ugt i32 %a, 300
- %cmp.b2 = icmp ugt i32 %b, 300
-
- %a.1 = select i1 %cmp.a, i32 1, i32 2
- %b.1 = select i1 %cmp.b, i32 1, i32 2
- %a.2 = select i1 %cmp.a2, i32 1, i32 2
- %b.2 = select i1 %cmp.b2, i32 1, i32 2
- %res1 = add i32 %a.1, %b.1
- %res2 = add i32 %a.2, %b.2
- %res3 = add i32 %res1, %res2
- ret i32 %res3
-}
-
-; Constant range for %x is [47, 302)
-; CHECK-LABEL: f2
-; CHECK: %cmp = icmp sgt i32 %x, 300
-; CHECK: %res1 = select i1 %cmp, i32 1, i32 2
-; CHECK-NEXT: %res4 = select i1 %cmp4, i32 3, i32 4
-; CHECK-NEXT: %res6 = add i32 %res1, 3
-; CHECK-NEXT: %res7 = add i32 5, %res4
-; CHECK-NEXT: %res = add i32 %res6, 5
-; CHECK-NEXT: ret i32 %res
-define internal i32 @f2(i32 %x) {
-entry:
- %cmp = icmp sgt i32 %x, 300
- %cmp2 = icmp ne i32 %x, 10
- %cmp3 = icmp sge i32 %x, 47
- %cmp4 = icmp ugt i32 %x, 300
- %cmp5 = icmp uge i32 %x, 47
- %res1 = select i1 %cmp, i32 1, i32 2
- %res2 = select i1 %cmp2, i32 3, i32 4
- %res3 = select i1 %cmp3, i32 5, i32 6
- %res4 = select i1 %cmp4, i32 3, i32 4
- %res5 = select i1 %cmp5, i32 5, i32 6
-
- %res6 = add i32 %res1, %res2
- %res7 = add i32 %res3, %res4
- %res = add i32 %res6, %res5
- ret i32 %res
-}
-
-define i32 @caller1() {
-entry:
- %call1 = tail call i32 @f1(i32 1, i32 301)
- %call2 = tail call i32 @f1(i32 47, i32 999)
- %call3 = tail call i32 @f2(i32 47)
- %call4 = tail call i32 @f2(i32 301)
- %res.1 = add nsw i32 12, %call3
- %res.2 = add nsw i32 %res.1, %call4
- ret i32 %res.2
-}
-
-; x is overdefined, because constant ranges are only used for parameter
-; values.
-; CHECK-LABEL: f3
-; CHECK: %cmp = icmp sgt i32 %x, 300
-; CHECK: %res = select i1 %cmp, i32 1, i32 2
-; CHECK: ret i32 %res
-define internal i32 @f3(i32 %x) {
-entry:
- %cmp = icmp sgt i32 %x, 300
- %res = select i1 %cmp, i32 1, i32 2
- ret i32 %res
-}
-
-; The phi node could be converted in a ConstantRange.
-define i32 @caller2(i1 %cmp) {
-entry:
- br i1 %cmp, label %if.true, label %end
-
-if.true:
- br label %end
-
-end:
- %res = phi i32 [ 0, %entry], [ 1, %if.true ]
- %call1 = tail call i32 @f3(i32 %res)
- ret i32 %call1
-}
-
-; CHECK-LABEL: f4
-; CHECK: %cmp = icmp sgt i32 %x, 300
-; CHECK: %res = select i1 %cmp, i32 1, i32 2
-; CHECK: ret i32 %res
-define internal i32 @f4(i32 %x) {
-entry:
- %cmp = icmp sgt i32 %x, 300
- %res = select i1 %cmp, i32 1, i32 2
- ret i32 %res
-}
-
-; ICmp could introduce bounds on ConstantRanges.
-define i32 @caller3(i32 %x) {
-entry:
- %cmp = icmp sgt i32 %x, 300
- br i1 %cmp, label %if.true, label %end
-
-if.true:
- %x.1 = tail call i32 @f4(i32 %x)
- br label %end
-
-end:
- %res = phi i32 [ 0, %entry], [ %x.1, %if.true ]
- ret i32 %res
-}
-
-; Check to make sure we do not attempt to access lattice values in unreachable
-; blocks.
-define i32 @test_unreachable() {
-entry:
- call i1 @test_unreachable_callee(i32 1)
- call i1 @test_unreachable_callee(i32 2)
- ret i32 1
-}
-
-define internal i1 @test_unreachable_callee(i32 %a) {
-entry:
- ret i1 true
-
-unreachablebb:
- %cmp = icmp eq i32 undef, %a
- unreachable
-}
-
-; Check that we do not attempt to get range info for non-integer types and
-; crash.
-define double @test_struct({ double, double } %test) {
- %v = extractvalue { double, double } %test, 0
- %r = fmul double %v, %v
- ret double %r
-}
-
-; Constant range for %x is [47, 302)
-; CHECK-LABEL: @f5
-; CHECK-NEXT: entry:
-; CHECK-NEXT: %cmp = icmp sgt i32 %x, undef
-; CHECK-NEXT: %res1 = select i1 %cmp, i32 1, i32 2
-; CHECK-NEXT: %res = add i32 %res1, 3
-; CHECK-NEXT: ret i32 %res
-define internal i32 @f5(i32 %x) {
-entry:
- %cmp = icmp sgt i32 %x, undef
- %cmp2 = icmp ne i32 undef, %x
- %res1 = select i1 %cmp, i32 1, i32 2
- %res2 = select i1 %cmp2, i32 3, i32 4
-
- %res = add i32 %res1, %res2
- ret i32 %res
-}
-
-define i32 @caller4() {
-entry:
- %call1 = tail call i32 @f5(i32 47)
- %call2 = tail call i32 @f5(i32 301)
- %res = add nsw i32 %call1, %call2
- ret i32 %res
-}
-
-; Make sure we do re-evaluate the function after ParamState changes.
-; CHECK-LABEL: @recursive_f
-; CHECK-LABEL: entry:
-; CHECK: %cmp = icmp eq i32 %i, 0
-; CHECK-NEXT: br i1 %cmp, label %if.then, label %if.else
-define internal i32 @recursive_f(i32 %i) {
-entry:
- %cmp = icmp eq i32 %i, 0
- br i1 %cmp, label %if.then, label %if.else
-
-if.then: ; preds = %entry
- br label %return
-
-if.else: ; preds = %entry
- %sub = sub nsw i32 %i, 1
- %call = call i32 @recursive_f(i32 %sub)
- %add = add i32 %i, %call
- br label %return
-
-return: ; preds = %if.else, %if.then
- %retval.0 = phi i32 [ 0, %if.then ], [ %add, %if.else ]
- ret i32 %retval.0
-}
-
-; CHECK-LABEL: @caller5
-; CHECK: %call = call i32 @recursive_f(i32 42)
-; CHECK-NEXT: ret i32 %call
-define i32 @caller5() {
-entry:
- %call = call i32 @recursive_f(i32 42)
- ret i32 %call
-}
diff --git a/llvm/test/Transforms/SCCP/ipsccp-addr-taken.ll b/llvm/test/Transforms/SCCP/ipsccp-addr-taken.ll
deleted file mode 100644
index ca586a009b3..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-addr-taken.ll
+++ /dev/null
@@ -1,28 +0,0 @@
-; RUN: opt -ipsccp -S < %s | FileCheck %s
-; PR7876
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
-target triple = "x86_64-apple-darwin10.0.0"
-
-define internal i32 @foo() nounwind noinline ssp {
-entry:
- ret i32 0
-; CHECK-LABEL: @foo(
-; CHECK: entry:
-; CHECK: ret i32 0
-}
-
-declare i32 @bar()
-
-define internal i32 @test(i32 %c) nounwind noinline ssp {
-bb:
- %tmp1 = icmp ne i32 %c, 0 ; <i1> [#uses=1]
- %tmp2 = select i1 %tmp1, i32 ()* @foo, i32 ()* @bar ; <i32 ()*> [#uses=1]
- %tmp3 = tail call i32 %tmp2() nounwind ; <i32> [#uses=1]
- ret i32 %tmp3
-}
-
-define i32 @main() nounwind ssp {
-bb:
- %tmp = tail call i32 @test(i32 1) ; <i32> [#uses=1]
- ret i32 %tmp
-}
diff --git a/llvm/test/Transforms/SCCP/ipsccp-basic.ll b/llvm/test/Transforms/SCCP/ipsccp-basic.ll
deleted file mode 100644
index b1660b54565..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-basic.ll
+++ /dev/null
@@ -1,273 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-; RUN: opt < %s -enable-debugify -ipsccp -debugify-quiet -disable-output
-
-;;======================== test1
-
-define internal i32 @test1a(i32 %A) {
- %X = add i32 1, 2
- ret i32 %A
-}
-; CHECK-LABEL: define internal i32 @test1a(
-; CHECK: ret i32 undef
-
-define i32 @test1b() {
- %X = call i32 @test1a( i32 17 )
- ret i32 %X
-
-; CHECK-LABEL: define i32 @test1b(
-; CHECK: ret i32 17
-}
-
-
-
-;;======================== test2
-
-define internal i32 @test2a(i32 %A) {
- %C = icmp eq i32 %A, 0
- br i1 %C, label %T, label %F
-T:
- %B = call i32 @test2a( i32 0 )
- ret i32 0
-F:
- %C.upgrd.1 = call i32 @test2a(i32 1)
- ret i32 %C.upgrd.1
-}
-; CHECK-LABEL: define internal i32 @test2a(
-; CHECK-NEXT: br label %T
-; CHECK: ret i32 undef
-
-
-define i32 @test2b() {
- %X = call i32 @test2a(i32 0)
- ret i32 %X
-}
-; CHECK-LABEL: define i32 @test2b(
-; CHECK-NEXT: %X = call i32 @test2a(i32 0)
-; CHECK-NEXT: ret i32 0
-
-
-;;======================== test3
-
-@G = internal global i32 undef
-
-define void @test3a() {
- %X = load i32, i32* @G
- store i32 %X, i32* @G
- ret void
-}
-; CHECK-LABEL: define void @test3a(
-; CHECK-NEXT: ret void
-
-
-define i32 @test3b() {
- %V = load i32, i32* @G
- %C = icmp eq i32 %V, 17
- br i1 %C, label %T, label %F
-T:
- store i32 17, i32* @G
- ret i32 %V
-F:
- store i32 123, i32* @G
- ret i32 0
-}
-; CHECK-LABEL: define i32 @test3b(
-; CHECK-NOT: store
-; CHECK: ret i32 0
-
-
-;;======================== test4
-
-define internal {i64,i64} @test4a() {
- %a = insertvalue {i64,i64} undef, i64 4, 1
- %b = insertvalue {i64,i64} %a, i64 5, 0
- ret {i64,i64} %b
-}
-
-; CHECK-LABEL: define internal { i64, i64 } @test4a(
-; CHECK-NEXT: ret { i64, i64 } undef
-; CHECK-NEXT: }
-
-define i64 @test4b() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
- %a = invoke {i64,i64} @test4a()
- to label %A unwind label %B
-A:
- %b = extractvalue {i64,i64} %a, 0
- %c = call i64 @test4c(i64 %b)
- ret i64 %c
-B:
- %val = landingpad { i8*, i32 }
- catch i8* null
- ret i64 0
-}
-; CHECK: define i64 @test4b()
-; CHECK: %c = call i64 @test4c(i64 5)
-; CHECK-NEXT: ret i64 5
-
-
-define internal i64 @test4c(i64 %a) {
- ret i64 %a
-}
-; CHECK-LABEL: define internal i64 @test4c(
-; CHECK: ret i64 undef
-
-
-
-;;======================== test5
-
-; PR4313
-define internal {i64,i64} @test5a() {
- %a = insertvalue {i64,i64} undef, i64 4, 1
- %b = insertvalue {i64,i64} %a, i64 5, 0
- ret {i64,i64} %b
-}
-
-define i64 @test5b() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
- %a = invoke {i64,i64} @test5a()
- to label %A unwind label %B
-A:
- %c = call i64 @test5c({i64,i64} %a)
- ret i64 %c
-B:
- %val = landingpad { i8*, i32 }
- catch i8* null
- ret i64 0
-}
-
-; CHECK: define i64 @test5b()
-; CHECK: A:
-; CHECK-NEXT: %c = call i64 @test5c({ i64, i64 } { i64 5, i64 4 })
-; CHECK-NEXT: ret i64 5
-
-define internal i64 @test5c({i64,i64} %a) {
- %b = extractvalue {i64,i64} %a, 0
- ret i64 %b
-}
-
-
-;;======================== test6
-
-define i64 @test6a() {
- ret i64 0
-}
-
-define i64 @test6b() {
- %a = call i64 @test6a()
- ret i64 %a
-}
-; CHECK-LABEL: define i64 @test6b(
-; CHECK: ret i64 0
-
-;;======================== test7
-
-
-%T = type {i32,i32}
-
-define internal %T @test7a(i32 %A) {
- %X = add i32 1, %A
- %mrv0 = insertvalue %T undef, i32 %X, 0
- %mrv1 = insertvalue %T %mrv0, i32 %A, 1
- ret %T %mrv1
-; CHECK-LABEL: @test7a(
-; CHECK-NEXT: ret %T undef
-}
-
-define i32 @test7b() {
- %X = call %T @test7a(i32 17)
- %Y = extractvalue %T %X, 0
- %Z = add i32 %Y, %Y
- ret i32 %Z
-; CHECK-LABEL: define i32 @test7b(
-; CHECK-NEXT: call %T @test7a(i32 17)
-; CHECK-NEXT: ret i32 36
-}
-
-;;======================== test8
-
-
-define internal {} @test8a(i32 %A, i32* %P) {
- store i32 %A, i32* %P
- ret {} {}
-; CHECK-LABEL: @test8a(
-; CHECK-NEXT: store i32 5,
-; CHECK-NEXT: ret
-}
-
-define void @test8b(i32* %P) {
- %X = call {} @test8a(i32 5, i32* %P)
- ret void
-; CHECK-LABEL: define void @test8b(
-; CHECK-NEXT: call {} @test8a
-; CHECK-NEXT: ret void
-}
-
-;;======================== test9
-
-@test9g = internal global { } zeroinitializer
-
-define void @test9() {
-entry:
- %local_foo = alloca { }
- load { }, { }* @test9g
- store { } %0, { }* %local_foo
- ret void
-}
-
-; CHECK-LABEL: define void @test9(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: %local_foo = alloca {}
-; CHECK-NEXT: store {} zeroinitializer, {}* %local_foo
-; CHECK-NEXT: ret void
-
-declare i32 @__gxx_personality_v0(...)
-
-;;======================== test10
-
-define i32 @test10a() nounwind {
-entry:
- %call = call i32 @test10b(i32 undef)
- ret i32 %call
-; CHECK-LABEL: define i32 @test10a(
-; CHECK: ret i32 0
-}
-
-define internal i32 @test10b(i32 %x) nounwind {
-entry:
- %r = and i32 %x, 1
- ret i32 %r
-; CHECK-LABEL: define internal i32 @test10b(
-; CHECK: ret i32 undef
-}
-
-;;======================== test11
-
-define i64 @test11a() {
- %xor = xor i64 undef, undef
- ret i64 %xor
-; CHECK-LABEL: define i64 @test11a
-; CHECK: ret i64 0
-}
-
-define i64 @test11b() {
- %call1 = call i64 @test11a()
- %call2 = call i64 @llvm.ctpop.i64(i64 %call1)
- ret i64 %call2
-; CHECK-LABEL: define i64 @test11b
-; CHECK: %[[call1:.*]] = call i64 @test11a()
-; CHECK-NOT: call i64 @llvm.ctpop.i64
-; CHECK-NEXT: ret i64 0
-}
-
-declare i64 @llvm.ctpop.i64(i64)
-
-;;======================== test12
-;; Ensure that a struct as an arg to a potentially constant-foldable
-;; function does not crash SCCP (for now it'll just ignores it)
-
-define i1 @test12() {
- %c = call i1 @llvm.is.constant.sl_i32i32s({i32, i32} {i32 -1, i32 32})
- ret i1 %c
-; CHECK-LABEL: define i1 @test12
-; CHECK: ret i1 %c
-}
-
-declare i1 @llvm.is.constant.sl_i32i32s({i32, i32} %a)
diff --git a/llvm/test/Transforms/SCCP/ipsccp-branch-unresolved-undef.ll b/llvm/test/Transforms/SCCP/ipsccp-branch-unresolved-undef.ll
deleted file mode 100644
index 7092b8d587a..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-branch-unresolved-undef.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -ipsccp | FileCheck %s
-
-define void @main() {
-; CHECK-LABEL: @main(
-; CHECK: %call = call i1 @patatino(i1 undef)
-; CHECK-NEXT: ret void
-;
- %call = call i1 @patatino(i1 undef)
- ret void
-}
-
-define internal i1 @patatino(i1 %a) {
-; CHECK-LABEL: define internal i1 @patatino(
-; CHECK-NEXT: br label [[ONFALSE:%.*]]
-; CHECK-EMPTY:
-; CHECK-NEXT: onfalse:
-; CHECK-NEXT: ret i1 undef
- br i1 %a, label %ontrue, label %onfalse
-ontrue:
- ret i1 false
-onfalse:
- ret i1 false
-}
diff --git a/llvm/test/Transforms/SCCP/ipsccp-phi-one-pred-dead.ll b/llvm/test/Transforms/SCCP/ipsccp-phi-one-pred-dead.ll
deleted file mode 100644
index 07637bd8bdb..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-phi-one-pred-dead.ll
+++ /dev/null
@@ -1,41 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -S -ipsccp | FileCheck %s
-target triple = "x86_64-unknown-linux-gnu"
-
-define void @test() {
-; CHECK-LABEL: @test(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label %Flow5.pre
-; CHECK: Flow6:
-; CHECK-NEXT: br i1 undef, label %end1, label %end2
-; CHECK: Flow5.pre:
-; CHECK-NEXT: br label %Flow5
-; CHECK: Flow5:
-; CHECK-NEXT: br label %Flow6
-; CHECK: end1:
-; CHECK-NEXT: unreachable
-; CHECK: end2:
-; CHECK-NEXT: unreachable
-;
-entry:
- br i1 true, label %Flow5.pre, label %Flow5.pre.unreachable
-
-Flow5.pre.unreachable:
- br label %Flow5
-
-Flow6:
- br i1 %0, label %end1, label %end2
-
-Flow5.pre:
- br label %Flow5
-
-Flow5:
- %0 = phi i1 [ undef, %Flow5.pre ], [ false, %Flow5.pre.unreachable ]
- br label %Flow6
-
-end1:
- unreachable
-
-end2:
- unreachable
-}
diff --git a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll b/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
deleted file mode 100644
index b840e5e09fd..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-preserve-analysis.ll
+++ /dev/null
@@ -1,56 +0,0 @@
-; Basic test to check that DominatorTreeAnalysis is preserved by IPSCCP and
-; the following analysis can re-use it. The test contains two trivial functions
-; IPSCCP can simplify, so we can test the case where IPSCCP makes changes.
-
-; RUN: opt -disable-verify -debug-pass-manager \
-; RUN: -passes='function(require<domtree>,require<postdomtree>),ipsccp,function(require<domtree>,require<postdomtree>)' -S %s 2>&1 \
-; RUN: | FileCheck -check-prefixes='IR,NEW-PM' %s
-
-; RUN: opt -passes='function(require<postdomtree>),ipsccp,function(verify<domtree>)' -S %s | FileCheck -check-prefixes='IR' %s
-
-; NEW-PM: Starting llvm::Module pass manager run.
-; NEW-PM: Running analysis: DominatorTreeAnalysis on f1
-; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f1
-; NEW-PM: Running analysis: DominatorTreeAnalysis on f2
-; NEW-PM: Running analysis: PostDominatorTreeAnalysis on f2
-; NEW-PM: Running pass: IPSCCPPass
-; NEW-PM-DAG: Running analysis: AssumptionAnalysis on f1
-; NEW-PM-DAG: Running analysis: AssumptionAnalysis on f2
-; NEW-PM-NEXT: Invalidating all non-preserved analyses for:
-; NEW-PM-NEXT: Invalidating all non-preserved analyses for: f1
-; NEW-PM-NEXT: Invalidating all non-preserved analyses for: f2
-; NEW-PM-NEXT: Running pass: ModuleToFunctionPassAdaptor
-; NEW-PM-NOT: Running analysis:
-
-; IR-LABEL: @f1
-; IR-LABEL: entry:
-; IR-NEXT: br label %bb2
-; IR-LABEL: bb2:
-; IR-NEXT: undef
-
-; IR-LABEL: @f2
-; IR-NOT: icmp
-; IR: br label %bbtrue
-; IR-LABEL: bbtrue:
-; IR-NEXT: ret i32 0
-define internal i32 @f1() readnone {
-entry:
- br i1 false, label %bb1, label %bb2
-bb1:
- ret i32 10
-bb2:
- ret i32 10
-}
-
-define i32 @f2(i32 %n) {
- %i = call i32 @f1()
- %cmp = icmp eq i32 %i, 10
- br i1 %cmp, label %bbtrue, label %bbfalse
-
-bbtrue:
- ret i32 0
-
-bbfalse:
- %res = add i32 %n, %i
- ret i32 %res
-}
diff --git a/llvm/test/Transforms/SCCP/ipsccp-ssa-copy-nested-conds.ll b/llvm/test/Transforms/SCCP/ipsccp-ssa-copy-nested-conds.ll
deleted file mode 100644
index 82f7db801bd..00000000000
--- a/llvm/test/Transforms/SCCP/ipsccp-ssa-copy-nested-conds.ll
+++ /dev/null
@@ -1,50 +0,0 @@
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-; RUN: opt < %s -passes=ipsccp -S | FileCheck %s
-
-; Test for PR39772
-; CHECK-LABEL: cleanup:
-; CHECK-NEXT: %retval.0 = phi i32 [ 0, %if.then ], [ %add, %if.then7 ], [ %add8, %if.else ]
-
-
-%struct.Node = type { %struct.Node*, %struct.Node*, i32 }
-
-define i32 @check(%struct.Node* %node) {
-entry:
- %cmp = icmp eq %struct.Node* %node, null
- br i1 %cmp, label %if.then, label %if.end
-
-if.then: ; preds = %entry
- br label %cleanup
-
-if.end: ; preds = %entry
- %left = getelementptr inbounds %struct.Node, %struct.Node* %node, i32 0, i32 0
- %0 = load %struct.Node*, %struct.Node** %left
- %call = call i32 @check(%struct.Node* %0)
- %right = getelementptr inbounds %struct.Node, %struct.Node* %node, i32 0, i32 1
- %1 = load %struct.Node*, %struct.Node** %right
- %call1 = call i32 @check(%struct.Node* %1)
- %2 = load %struct.Node*, %struct.Node** %right
- %height = getelementptr inbounds %struct.Node, %struct.Node* %2, i32 0, i32 2
- %3 = load i32, i32* %height
- %cmp3 = icmp ne i32 %3, %call1
- br i1 %cmp3, label %if.then4, label %if.end5
-
-if.then4: ; preds = %if.end
- unreachable
-
-if.end5: ; preds = %if.end
- %cmp6 = icmp sgt i32 %call, %call1
- br i1 %cmp6, label %if.then7, label %if.else
-
-if.then7: ; preds = %if.end5
- %add = add nsw i32 %call, 1
- br label %cleanup
-
-if.else: ; preds = %if.end5
- %add8 = add nsw i32 %call1, 1
- br label %cleanup
-
-cleanup: ; preds = %if.else, %if.then7, %if.then
- %retval.0 = phi i32 [ 0, %if.then ], [ %add, %if.then7 ], [ %add8, %if.else ]
- ret i32 %retval.0
-}
diff --git a/llvm/test/Transforms/SCCP/latticeval-invalidate.ll b/llvm/test/Transforms/SCCP/latticeval-invalidate.ll
deleted file mode 100644
index 19ea425312f..00000000000
--- a/llvm/test/Transforms/SCCP/latticeval-invalidate.ll
+++ /dev/null
@@ -1,41 +0,0 @@
-; RUN: opt -S -sccp %s
-
-@A = external constant i32
-
-define void @test1() {
-BB4:
- %A20 = alloca i1
- %A15 = alloca i64
- %A7 = alloca i64
- %A3 = alloca i32**
- %P = getelementptr i32, i32* @A, i32 0
- %B = ptrtoint i32* %P to i64
- %B8 = shl i64 %B, 9223372036854775807
- %G10 = getelementptr i32*, i32** undef, i64 %B
- %B10 = urem i64 %B, %B8
- %B12 = shl i64 %B, %B
- %BB = and i64 %B, %B8
- %B1 = xor i64 %B, %B
- %B23 = lshr i64 %B8, undef
- %C5 = icmp uge i64 %B, %B10
- %C17 = fcmp ord double 4.940660e-324, 0x7FEFFFFFFFFFFFFF
- %C2 = icmp uge i1 %C17, false
- %G = getelementptr i32, i32* %P, i1 %C17
- %X = select i1 false, i712 0, i712 1
- %C4 = icmp ule i1 true, false
- %B3 = xor i1 %C17, %C2
- %C33 = icmp slt i1 false, %C5
- %B15 = sub i64 %B8, %B23
- %C18 = icmp slt i64 undef, %BB
- %G29 = getelementptr i32**, i32*** undef, i64 %B15
- %C35 = icmp eq i1 %C17, undef
- %C31 = icmp ult i1 %C35, %C5
- %C29 = icmp sle i1 true, %C5
- %C16 = icmp ne i16 -1, -32768
- %A24 = alloca i1
- %A21 = alloca i1
- %A25 = alloca i32**
- %C7 = icmp ule i1 %C4, %B3
- %C14 = icmp slt i64 %B8, 0
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/loadtest.ll b/llvm/test/Transforms/SCCP/loadtest.ll
deleted file mode 100644
index baaad94b0cc..00000000000
--- a/llvm/test/Transforms/SCCP/loadtest.ll
+++ /dev/null
@@ -1,46 +0,0 @@
-; This test makes sure that these instructions are properly constant propagated.
-
-; RUN: opt < %s -data-layout="e-p:32:32" -debugify -sccp -S | FileCheck %s
-; RUN: opt < %s -data-layout="E-p:32:32" -debugify -sccp -S | FileCheck %s
-
-@X = constant i32 42 ; <i32*> [#uses=1]
-@Y = constant [2 x { i32, float }] [ { i32, float } { i32 12, float 1.000000e+00 }, { i32, float } { i32 37, float 0x3FF3B2FEC0000000 } ] ; <[2 x { i32, float }]*> [#uses=2]
-
-define i32 @test1() {
-; CHECK-LABEL: @test1(
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 42
-; CHECK-NEXT: ret
- %B = load i32, i32* @X ; <i32> [#uses=1]
- ret i32 %B
-}
-
-define float @test2() {
-; CHECK-LABEL: @test2(
-; CHECK-NEXT: call void @llvm.dbg.value(metadata float* getelementptr
-; CHECK-NEXT: call void @llvm.dbg.value(metadata float 0x3FF3B2FEC0000000
-; CHECK-NEXT: ret
- %A = getelementptr [2 x { i32, float }], [2 x { i32, float }]* @Y, i64 0, i64 1, i32 1 ; <float*> [#uses=1]
- %B = load float, float* %A ; <float> [#uses=1]
- ret float %B
-}
-
-define i32 @test3() {
-; CHECK-LABEL: @test3(
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i32* getelementptr
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i32 12
-; CHECK-NEXT: ret
- %A = getelementptr [2 x { i32, float }], [2 x { i32, float }]* @Y, i64 0, i64 0, i32 0 ; <i32*> [#uses=1]
- %B = load i32, i32* %A
- ret i32 %B
-}
-
-define i8 @test4() {
-; CHECK-LABEL: @test4(
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i8* bitcast
-; CHECK-NEXT: call void @llvm.dbg.value(metadata i8
-; CHECK-NEXT: ret
- %A = bitcast i32* @X to i8*
- %B = load i8, i8* %A
- ret i8 %B
-}
-
diff --git a/llvm/test/Transforms/SCCP/logical-nuke.ll b/llvm/test/Transforms/SCCP/logical-nuke.ll
deleted file mode 100644
index 6ca16de4489..00000000000
--- a/llvm/test/Transforms/SCCP/logical-nuke.ll
+++ /dev/null
@@ -1,39 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-; Test that SCCP has basic knowledge of when and/or/mul nuke overdefined values.
-
-; CHECK-LABEL: test
-; CHECK: ret i32 0
- define i32 @test(i32 %X) {
- %Y = and i32 %X, 0
- ret i32 %Y
-}
-
-; CHECK-LABEL: test2
-; CHECK: ret i32 -1
-define i32 @test2(i32 %X) {
- %Y = or i32 -1, %X
- ret i32 %Y
-}
-
-; CHECK-LABEL: test3
-; CHECK: ret i32 0
-define i32 @test3(i32 %X) {
- %Y = and i32 undef, %X
- ret i32 %Y
-}
-
-; CHECK-LABEL: test4
-; CHECK: ret i32 -1
-define i32 @test4(i32 %X) {
- %Y = or i32 %X, undef
- ret i32 %Y
-}
-
-; X * 0 = 0 even if X is overdefined.
-; CHECK-LABEL: test5
-; CHECK: ret i32 0
-define i32 @test5(i32 %foo) {
- %patatino = mul i32 %foo, 0
- ret i32 %patatino
-}
diff --git a/llvm/test/Transforms/SCCP/overdefined-div.ll b/llvm/test/Transforms/SCCP/overdefined-div.ll
deleted file mode 100644
index f0b16155c17..00000000000
--- a/llvm/test/Transforms/SCCP/overdefined-div.ll
+++ /dev/null
@@ -1,32 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-; Test that SCCP has basic knowledge of when div can nuke overdefined values.
-
-; 0 / X = 0 even if X is overdefined.
-; CHECK-LABEL: test1
-; CHECK-NEXT: ret i32 0
-define i32 @test1(i32 %foo) {
- %tinkywinky = udiv i32 0, %foo
- ret i32 %tinkywinky
-}
-
-; CHECK-LABEL: test2
-; CHECK-NEXT: ret i32 0
-define i32 @test2(i32 %foo) {
- %tinkywinky = sdiv i32 0, %foo
- ret i32 %tinkywinky
-}
-
-; CHECK-LABEL: test3
-; CHECK: ret i32 %tinkywinky
-define i32 @test3(i32 %foo) {
- %tinkywinky = udiv i32 %foo, 0
- ret i32 %tinkywinky
-}
-
-; CHECK-LABEL: test4
-; CHECK: ret i32 %tinkywinky
-define i32 @test4(i32 %foo) {
- %tinkywinky = sdiv i32 %foo, 0
- ret i32 %tinkywinky
-}
diff --git a/llvm/test/Transforms/SCCP/pr27712.ll b/llvm/test/Transforms/SCCP/pr27712.ll
deleted file mode 100644
index b41c3981d53..00000000000
--- a/llvm/test/Transforms/SCCP/pr27712.ll
+++ /dev/null
@@ -1,30 +0,0 @@
-; RUN: opt -sccp -S < %s | FileCheck %s
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-define i32 @main() {
-entry:
- br label %lbl_1154
-
-lbl_1154:
- %b0.0 = phi i32 [ -119, %entry ], [ 0, %lbl_1154 ]
- %cmp11 = icmp slt i32 %b0.0, 0
- %shl.op = shl i32 33554432, %b0.0
- %cmp1445 = icmp ult i32 %shl.op, 33554432
- %cmp14 = or i1 %cmp11, %cmp1445
- br i1 %cmp14, label %lbl_1154, label %if.end19
-
-if.end19:
- br i1 %cmp11, label %if.then22, label %cleanup26
-
-if.then22:
- tail call void @abort()
- unreachable
-
-cleanup26:
- ret i32 %shl.op
-}
-; CHECK-LABEL: define i32 @main(
-; CHECK-NOT: ret i32 undef
-
-declare void @abort()
diff --git a/llvm/test/Transforms/SCCP/pr35357.ll b/llvm/test/Transforms/SCCP/pr35357.ll
deleted file mode 100644
index fda123b76f7..00000000000
--- a/llvm/test/Transforms/SCCP/pr35357.ll
+++ /dev/null
@@ -1,24 +0,0 @@
-; RUN: opt -S %s -ipsccp | FileCheck %s
-
-@a = internal global i32 2
-
-define i32 @patatino() {
-; CHECK: @patatino(
-; CHECK: call void @f(i32 undef, i32 1)
-; CHECK-NEXT: call void @f(i32 2, i32 0)
-; CHECK-NEXT: ret i32 0
-entry:
- call void @f(i32 undef, i32 1)
- %0 = load i32, i32* @a
- call void @f(i32 %0, i32 0)
- ret i32 0
-}
-
-define internal void @f(i32 %c, i32 %d) {
-; CHECK: @f(
-; CHECK: ret void
-;
-entry:
- %cmp = icmp ne i32 %c, %d
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/preserve-analysis.ll b/llvm/test/Transforms/SCCP/preserve-analysis.ll
deleted file mode 100644
index 8d34e7195b9..00000000000
--- a/llvm/test/Transforms/SCCP/preserve-analysis.ll
+++ /dev/null
@@ -1,34 +0,0 @@
-; RUN: opt < %s -debug-pass=Structure -globals-aa -loop-vectorize -sccp -loop-vectorize -globals-aa 2>&1 -S | FileCheck %s
-; RUN: opt < %s -debug-pass-manager -passes='loop-vectorize,sccp,loop-vectorize' 2>&1 -S | FileCheck --check-prefix=NEW-PM %s
-
-; Check CFG-only analysis are preserved by SCCP by running it between 2
-; loop-vectorize runs.
-
-; CHECK: Globals Alias Analysis
-; CHECK: Dominator Tree Construction
-; CHECK: Natural Loop Information
-; CHECK: Sparse Conditional Constant Propagation
-; CHECK-NOT: Dominator Tree Construction
-; CHECK-NOT: Natural Loop Information
-; CHECK-NOT: Globals Alias Analysis
-; CHECK: Loop Vectorization
-
-; NEW-PM-DAG: Running analysis: LoopAnalysis on test
-; NEW-PM-DAG: Running analysis: DominatorTreeAnalysis on test
-; NEW-PM-DAG: Running analysis: AssumptionAnalysis on test
-; NEW-PM-DAG: Running analysis: TargetLibraryAnalysis on test
-; NEW-PM-DAG: Running analysis: TargetIRAnalysis on test
-; NEW-PM: Running pass: SCCPPass on test
-; NEW-PM-NOT: Running analysis: LoopAnalysis on test
-; NEW-PM-NOT: Running analysis: DominatorTreeAnalysis on test
-; NEW-PM-NOT: Running analysis: AssumptionAnalysis on test
-; NEW-PM-NOT: Running analysis: TargetLibraryAnalysis on test
-; NEW-PM-NOT: Running analysis: TargetIRAnalysis on test
-; NEW-PM: Finished llvm::Function pass manager run.
-
-
-define i32 @test() {
-entry:
- %res = add i32 1, 10
- ret i32 %res
-}
diff --git a/llvm/test/Transforms/SCCP/return-zapped.ll b/llvm/test/Transforms/SCCP/return-zapped.ll
deleted file mode 100644
index 1cdf9076821..00000000000
--- a/llvm/test/Transforms/SCCP/return-zapped.ll
+++ /dev/null
@@ -1,62 +0,0 @@
-; RUN: opt < %s -S -ipsccp | FileCheck %s
-
-; After the first round of Solver.Solve(), the return value of @testf still
-; undefined as we hit a branch on undef. Therefore the conditional branch on
-; @testf's return value in @bar is unknown. In ResolvedUndefsIn, we force the
-; false branch to be feasible. We later discover that @testf actually
-; returns true, so we end up with an unfolded "br i1 true".
-define void @test1() {
-; CHECK-LABEL: @test1(
-; CHECK-LABEL: if.then:
-; CHECK: [[CALL:%.+]] = call i1 @testf()
-; CHECK-NEXT: br i1 true, label %if.end, label %if.then
-;
-entry:
- br label %if.then
-if.then: ; preds = %entry, %if.then
- %foo = phi i32 [ 0, %entry], [ %next, %if.then]
- %next = add i32 %foo, 1
- %call = call i1 @testf()
- br i1 %call, label %if.end, label %if.then
-
-if.end: ; preds = %if.then, %entry
- ret void
-}
-
-define internal i1 @testf() {
-; CHECK-LABEL: define internal i1 @testf(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[IF_END3:%.*]]
-; CHECK: if.end3:
-; CHECK-NEXT: ret i1 undef
-;
-entry:
- br i1 undef, label %if.then1, label %if.end3
-
-if.then1: ; preds = %if.end
- br label %if.end3
-
-if.end3: ; preds = %if.then1, %entry
- ret i1 true
-}
-
-
-; Call sites in unreachable blocks should not be a problem.
-; CHECK-LABEL: define i1 @test2() {
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label %if.end
-; CHECK-LABEL: if.end: ; preds = %entry
-; CHECK-NEXT: %call2 = call i1 @testf()
-; CHECK-NEXT: ret i1 true
-define i1 @test2() {
-entry:
- br label %if.end
-
-if.then: ; preds = %entry, %if.then
- %call = call i1 @testf()
- br i1 %call, label %if.end, label %if.then
-
-if.end: ; preds = %if.then, %entry
- %call2 = call i1 @testf()
- ret i1 %call2
-}
diff --git a/llvm/test/Transforms/SCCP/retvalue-undef.ll b/llvm/test/Transforms/SCCP/retvalue-undef.ll
deleted file mode 100644
index f0e9e676cc0..00000000000
--- a/llvm/test/Transforms/SCCP/retvalue-undef.ll
+++ /dev/null
@@ -1,32 +0,0 @@
-; RUN: opt -ipsccp -S < %s | FileCheck %s
-; PR6414
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
-target triple = "x86_64-unknown-linux-gnu"
-
-define internal i32 ()* @f() {
- ret i32 ()* @g
-}
-
-define internal i32 @g() {
- ret i32 8
-}
-
-; CHECK: internal i32 @g()
-; CHECK-NEXT: ret i32 8
-
-define internal void @outer_mod() {
- %1 = call i32 ()* () @f() ; <i32 ()*> [#uses=1]
- %2 = call i32 %1() ; <i32> [#uses=0]
- ret void
-}
-
-define internal void @module_init() {
- call void @register_outer_mod(void ()* @outer_mod)
- ret void
-}
-
-declare void @register_outer_mod(void ()*)
-
-define i32 @main() {
- ret i32 0
-}
diff --git a/llvm/test/Transforms/SCCP/sccptest.ll b/llvm/test/Transforms/SCCP/sccptest.ll
deleted file mode 100644
index 5cc5087b101..00000000000
--- a/llvm/test/Transforms/SCCP/sccptest.ll
+++ /dev/null
@@ -1,58 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-; This is a basic sanity check for constant propagation. The add instruction
-; should be eliminated.
-
-define i32 @test1(i1 %B) {
- br i1 %B, label %BB1, label %BB2
-BB1: ; preds = %0
- %Val = add i32 0, 0 ; <i32> [#uses=1]
- br label %BB3
-BB2: ; preds = %0
- br label %BB3
-BB3: ; preds = %BB2, %BB1
- %Ret = phi i32 [ %Val, %BB1 ], [ 1, %BB2 ] ; <i32> [#uses=1]
- ret i32 %Ret
-
-; CHECK-LABEL: @test1(
-; CHECK: %Ret = phi i32 [ 0, %BB1 ], [ 1, %BB2 ]
-}
-
-; This is the test case taken from appel's book that illustrates a hard case
-; that SCCP gets right.
-;
-define i32 @test2(i32 %i0, i32 %j0) {
-; CHECK-LABEL: @test2(
-BB1:
- br label %BB2
-BB2:
- %j2 = phi i32 [ %j4, %BB7 ], [ 1, %BB1 ]
- %k2 = phi i32 [ %k4, %BB7 ], [ 0, %BB1 ]
- %kcond = icmp slt i32 %k2, 100
- br i1 %kcond, label %BB3, label %BB4
-BB3:
- %jcond = icmp slt i32 %j2, 20
- br i1 %jcond, label %BB5, label %BB6
-; CHECK: BB3:
-; CHECK-NEXT: br i1 true, label %BB5, label %BB6
-BB4:
- ret i32 %j2
-; CHECK: BB4:
-; CHECK-NEXT: ret i32 1
-BB5:
- %k3 = add i32 %k2, 1
- br label %BB7
-BB6:
- %k5 = add i32 %k2, 1
- br label %BB7
-; CHECK: BB6:
-; CHECK-NEXT: br label %BB7
-BB7:
- %j4 = phi i32 [ 1, %BB5 ], [ %k2, %BB6 ]
- %k4 = phi i32 [ %k3, %BB5 ], [ %k5, %BB6 ]
- br label %BB2
-; CHECK: BB7:
-; CHECK-NEXT: %k4 = phi i32 [ %k3, %BB5 ], [ undef, %BB6 ]
-; CHECK-NEXT: br label %BB2
-}
-
diff --git a/llvm/test/Transforms/SCCP/select.ll b/llvm/test/Transforms/SCCP/select.ll
deleted file mode 100644
index b2f1dd2d0f2..00000000000
--- a/llvm/test/Transforms/SCCP/select.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; RUN: opt < %s -sccp -S | not grep select
-
-define i32 @test1(i1 %C) {
- %X = select i1 %C, i32 0, i32 0 ; <i32> [#uses=1]
- ret i32 %X
-}
-
-define i32 @test2(i1 %C) {
- %X = select i1 %C, i32 0, i32 undef ; <i32> [#uses=1]
- ret i32 %X
-}
-
diff --git a/llvm/test/Transforms/SCCP/switch-multiple-undef.ll b/llvm/test/Transforms/SCCP/switch-multiple-undef.ll
deleted file mode 100644
index 027c9c0c9ba..00000000000
--- a/llvm/test/Transforms/SCCP/switch-multiple-undef.ll
+++ /dev/null
@@ -1,27 +0,0 @@
-; RUN: opt -S -ipsccp < %s | FileCheck %s
-
-declare void @foo()
-declare void @goo()
-declare void @patatino()
-
-define void @test1(i32 %t) {
- %choice = icmp eq i32 undef, -1
- switch i1 %choice, label %first [i1 0, label %second
- i1 1, label %third]
-first:
- call void @foo()
- ret void
-second:
- call void @goo()
- ret void
-third:
- call void @patatino()
- ret void
-}
-
-; CHECK: define void @test1(i32 %t) {
-; CHECK-NEXT: br label %second
-; CHECK: second:
-; CHECK-NEXT: call void @goo()
-; CHECK-NEXT: ret void
-; CHECK-NEXT: }
diff --git a/llvm/test/Transforms/SCCP/switch-undef-constantfoldterminator.ll b/llvm/test/Transforms/SCCP/switch-undef-constantfoldterminator.ll
deleted file mode 100644
index 169f0e83f1f..00000000000
--- a/llvm/test/Transforms/SCCP/switch-undef-constantfoldterminator.ll
+++ /dev/null
@@ -1,47 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -ipsccp -S | FileCheck %s
-
-; This test case used to end up like this:
-;
-; While deleting: label %lor.rhs
-; Use still stuck around after Def is destroyed: br i1 undef, label %lor.rhs, label %land.end
-; opt: ../lib/IR/Value.cpp: llvm::Value::~Value(): Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed.
-;
-; due to ConstantFoldTerminator rewriting the switch into
-;
-; br i1 undef, label %lor.rhs, label %land.end
-;
-; while SCCP implementation relied on the terminator to always be folded into
-; an unconditional branch when ConstantFoldTerminator returned true.
-
-define void @f4() {
-; CHECK-LABEL: define void @f4(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: [[CALL:%.*]] = call i16 @f3(i16 undef)
-; CHECK-NEXT: ret void
-;
-entry:
- %call = call i16 @f3(i16 undef)
- ret void
-}
-
-define internal i16 @f3(i16 %p1) {
-; CHECK-LABEL: define internal i16 @f3(
-; CHECK-NEXT: entry:
-; CHECK-NEXT: br label [[LAND_END:%.*]]
-; CHECK: land.end:
-; CHECK-NEXT: ret i16 undef
-;
-entry:
- switch i16 %p1, label %land.end [
- i16 0, label %land.end
- i16 1, label %lor.rhs
- ]
-
-lor.rhs:
- br label %land.end
-
-land.end:
- ret i16 0
-}
-
diff --git a/llvm/test/Transforms/SCCP/switch.ll b/llvm/test/Transforms/SCCP/switch.ll
deleted file mode 100644
index 155faa5c606..00000000000
--- a/llvm/test/Transforms/SCCP/switch.ll
+++ /dev/null
@@ -1,13 +0,0 @@
-; RUN: opt -S -sccp < %s | FileCheck %s
-
-; Make sure we always consider the default edge executable for a switch
-; with no cases.
-declare void @foo()
-define void @test1() {
-; CHECK-LABEL: define void @test1(
-; CHECK: call void @foo()
- switch i32 undef, label %d []
-d:
- call void @foo()
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/ub-shift.ll b/llvm/test/Transforms/SCCP/ub-shift.ll
deleted file mode 100644
index 3fb2d97457d..00000000000
--- a/llvm/test/Transforms/SCCP/ub-shift.ll
+++ /dev/null
@@ -1,69 +0,0 @@
-; RUN: opt < %s -sccp -S | FileCheck %s
-
-; CHECK-LABEL: shift_undef_64
-define void @shift_undef_64(i64* %p) {
- %r1 = lshr i64 -1, 4294967296 ; 2^32
- ; CHECK: store i64 undef
- store i64 %r1, i64* %p
-
- %r2 = ashr i64 -1, 4294967297 ; 2^32 + 1
- ; CHECK: store i64 undef
- store i64 %r2, i64* %p
-
- %r3 = shl i64 -1, 4294967298 ; 2^32 + 2
- ; CHECK: store i64 undef
- store i64 %r3, i64* %p
-
- ret void
-}
-
-; CHECK-LABEL: shift_undef_65
-define void @shift_undef_65(i65* %p) {
- %r1 = lshr i65 2, 18446744073709551617
- ; CHECK: store i65 undef
- store i65 %r1, i65* %p
-
- %r2 = ashr i65 4, 18446744073709551617
- ; CHECK: store i65 undef
- store i65 %r2, i65* %p
-
- %r3 = shl i65 1, 18446744073709551617
- ; CHECK: store i65 undef
- store i65 %r3, i65* %p
-
- ret void
-}
-
-; CHECK-LABEL: shift_undef_256
-define void @shift_undef_256(i256* %p) {
- %r1 = lshr i256 2, 18446744073709551617
- ; CHECK: store i256 undef
- store i256 %r1, i256* %p
-
- %r2 = ashr i256 4, 18446744073709551618
- ; CHECK: store i256 undef
- store i256 %r2, i256* %p
-
- %r3 = shl i256 1, 18446744073709551619
- ; CHECK: store i256 undef
- store i256 %r3, i256* %p
-
- ret void
-}
-
-; CHECK-LABEL: shift_undef_511
-define void @shift_undef_511(i511* %p) {
- %r1 = lshr i511 -1, 1208925819614629174706276 ; 2^80 + 100
- ; CHECK: store i511 undef
- store i511 %r1, i511* %p
-
- %r2 = ashr i511 -2, 1208925819614629174706200
- ; CHECK: store i511 undef
- store i511 %r2, i511* %p
-
- %r3 = shl i511 -3, 1208925819614629174706180
- ; CHECK: store i511 undef
- store i511 %r3, i511* %p
-
- ret void
-}
diff --git a/llvm/test/Transforms/SCCP/undef-resolve.ll b/llvm/test/Transforms/SCCP/undef-resolve.ll
deleted file mode 100644
index dd7f1f3dd88..00000000000
--- a/llvm/test/Transforms/SCCP/undef-resolve.ll
+++ /dev/null
@@ -1,182 +0,0 @@
-; RUN: opt -sccp -S < %s | FileCheck %s
-
-
-; PR6940
-define double @test1() {
- %t = sitofp i32 undef to double
- ret double %t
-; CHECK-LABEL: @test1(
-; CHECK: ret double 0.0
-}
-
-
-; rdar://7832370
-; Check that lots of stuff doesn't get turned into undef.
-define i32 @test2() nounwind readnone ssp {
-; CHECK-LABEL: @test2(
-init:
- br label %control.outer.outer
-
-control.outer.loopexit.us-lcssa: ; preds = %control
- br label %control.outer.loopexit
-
-control.outer.loopexit: ; preds = %control.outer.loopexit.us-lcssa.us, %control.outer.loopexit.us-lcssa
- br label %control.outer.outer.backedge
-
-control.outer.outer: ; preds = %control.outer.outer.backedge, %init
- %switchCond.0.ph.ph = phi i32 [ 2, %init ], [ 3, %control.outer.outer.backedge ] ; <i32> [#uses=2]
- %i.0.ph.ph = phi i32 [ undef, %init ], [ %i.0.ph.ph.be, %control.outer.outer.backedge ] ; <i32> [#uses=1]
- %tmp4 = icmp eq i32 %i.0.ph.ph, 0 ; <i1> [#uses=1]
- br i1 %tmp4, label %control.outer.outer.split.us, label %control.outer.outer.control.outer.outer.split_crit_edge
-
-control.outer.outer.control.outer.outer.split_crit_edge: ; preds = %control.outer.outer
- br label %control.outer
-
-control.outer.outer.split.us: ; preds = %control.outer.outer
- br label %control.outer.us
-
-control.outer.us: ; preds = %bb3.us, %control.outer.outer.split.us
- %A.0.ph.us = phi i32 [ %switchCond.0.us, %bb3.us ], [ 4, %control.outer.outer.split.us ] ; <i32> [#uses=2]
- %switchCond.0.ph.us = phi i32 [ %A.0.ph.us, %bb3.us ], [ %switchCond.0.ph.ph, %control.outer.outer.split.us ] ; <i32> [#uses=1]
- br label %control.us
-
-bb3.us: ; preds = %control.us
- br label %control.outer.us
-
-bb0.us: ; preds = %control.us
- br label %control.us
-
-; CHECK: control.us: ; preds = %bb0.us, %control.outer.us
-; CHECK-NEXT: %switchCond.0.us = phi i32
-; CHECK-NEXT: switch i32 %switchCond.0.us
-control.us: ; preds = %bb0.us, %control.outer.us
- %switchCond.0.us = phi i32 [ %A.0.ph.us, %bb0.us ], [ %switchCond.0.ph.us, %control.outer.us ] ; <i32> [#uses=2]
- switch i32 %switchCond.0.us, label %control.outer.loopexit.us-lcssa.us [
- i32 0, label %bb0.us
- i32 1, label %bb1.us-lcssa.us
- i32 3, label %bb3.us
- i32 4, label %bb4.us-lcssa.us
- ]
-
-control.outer.loopexit.us-lcssa.us: ; preds = %control.us
- br label %control.outer.loopexit
-
-bb1.us-lcssa.us: ; preds = %control.us
- br label %bb1
-
-bb4.us-lcssa.us: ; preds = %control.us
- br label %bb4
-
-control.outer: ; preds = %bb3, %control.outer.outer.control.outer.outer.split_crit_edge
- %A.0.ph = phi i32 [ %nextId17, %bb3 ], [ 4, %control.outer.outer.control.outer.outer.split_crit_edge ] ; <i32> [#uses=1]
- %switchCond.0.ph = phi i32 [ 0, %bb3 ], [ %switchCond.0.ph.ph, %control.outer.outer.control.outer.outer.split_crit_edge ] ; <i32> [#uses=1]
- br label %control
-
-control: ; preds = %bb0, %control.outer
- %switchCond.0 = phi i32 [ %A.0.ph, %bb0 ], [ %switchCond.0.ph, %control.outer ] ; <i32> [#uses=2]
- switch i32 %switchCond.0, label %control.outer.loopexit.us-lcssa [
- i32 0, label %bb0
- i32 1, label %bb1.us-lcssa
- i32 3, label %bb3
- i32 4, label %bb4.us-lcssa
- ]
-
-bb4.us-lcssa: ; preds = %control
- br label %bb4
-
-bb4: ; preds = %bb4.us-lcssa, %bb4.us-lcssa.us
- br label %control.outer.outer.backedge
-
-control.outer.outer.backedge: ; preds = %bb4, %control.outer.loopexit
- %i.0.ph.ph.be = phi i32 [ 1, %bb4 ], [ 0, %control.outer.loopexit ] ; <i32> [#uses=1]
- br label %control.outer.outer
-
-bb3: ; preds = %control
- %nextId17 = add i32 %switchCond.0, -2 ; <i32> [#uses=1]
- br label %control.outer
-
-bb0: ; preds = %control
- br label %control
-
-bb1.us-lcssa: ; preds = %control
- br label %bb1
-
-bb1: ; preds = %bb1.us-lcssa, %bb1.us-lcssa.us
- ret i32 0
-}
-
-; Make sure SCCP honors the xor "idiom"
-; rdar://9956541
-define i32 @test3() {
- %t = xor i32 undef, undef
- ret i32 %t
-; CHECK-LABEL: @test3(
-; CHECK: ret i32 0
-}
-
-; Be conservative with FP ops
-define double @test4(double %x) {
- %t = fadd double %x, undef
- ret double %t
-; CHECK-LABEL: @test4(
-; CHECK: fadd double %x, undef
-}
-
-; Make sure casts produce a possible value
-define i32 @test5() {
- %t = sext i8 undef to i32
- ret i32 %t
-; CHECK-LABEL: @test5(
-; CHECK: ret i32 0
-}
-
-; Make sure ashr produces a possible value
-define i32 @test6() {
- %t = ashr i32 undef, 31
- ret i32 %t
-; CHECK-LABEL: @test6(
-; CHECK: ret i32 0
-}
-
-; Make sure lshr produces a possible value
-define i32 @test7() {
- %t = lshr i32 undef, 31
- ret i32 %t
-; CHECK-LABEL: @test7(
-; CHECK: ret i32 0
-}
-
-; icmp eq with undef simplifies to undef
-define i1 @test8() {
- %t = icmp eq i32 undef, -1
- ret i1 %t
-; CHECK-LABEL: @test8(
-; CHECK: ret i1 undef
-}
-
-; Make sure we don't conclude that relational comparisons simplify to undef
-define i1 @test9() {
- %t = icmp ugt i32 undef, -1
- ret i1 %t
-; CHECK-LABEL: @test9(
-; CHECK: icmp ugt
-}
-
-; Make sure we handle extractvalue
-define i64 @test10() {
-entry:
- %e = extractvalue { i64, i64 } undef, 1
- ret i64 %e
-; CHECK-LABEL: @test10(
-; CHECK: ret i64 undef
-}
-
-@GV = external global i32
-
-define i32 @test11(i1 %tobool) {
-entry:
- %shr4 = ashr i32 undef, zext (i1 icmp eq (i32* bitcast (i32 (i1)* @test11 to i32*), i32* @GV) to i32)
- ret i32 %shr4
-; CHECK-LABEL: @test11(
-; CHECK: ret i32 0
-}
diff --git a/llvm/test/Transforms/SCCP/vector-bitcast.ll b/llvm/test/Transforms/SCCP/vector-bitcast.ll
deleted file mode 100644
index b032085083c..00000000000
--- a/llvm/test/Transforms/SCCP/vector-bitcast.ll
+++ /dev/null
@@ -1,20 +0,0 @@
-; RUN: opt -sccp -S < %s | FileCheck %s
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"
-
-; CHECK: store volatile <2 x i64> zeroinitializer, <2 x i64>* %p
-; rdar://11324230
-
-define void @foo(<2 x i64>* %p) nounwind {
-entry:
- br label %while.body.i
-
-while.body.i: ; preds = %while.body.i, %entry
- %vWorkExponent.i.033 = phi <4 x i32> [ %sub.i.i, %while.body.i ], [ <i32 939524096, i32 939524096, i32 939524096, i32 939524096>, %entry ]
- %sub.i.i = add <4 x i32> %vWorkExponent.i.033, <i32 -8388608, i32 -8388608, i32 -8388608, i32 -8388608>
- %0 = bitcast <4 x i32> %sub.i.i to <2 x i64>
- %and.i119.i = and <2 x i64> %0, zeroinitializer
- store volatile <2 x i64> %and.i119.i, <2 x i64>* %p
- br label %while.body.i
-}
-
OpenPOWER on IntegriCloud