diff options
Diffstat (limited to 'test/CodeGen/Generic')
11 files changed, 68 insertions, 40 deletions
diff --git a/test/CodeGen/Generic/2004-02-08-UnwindSupport.ll b/test/CodeGen/Generic/2004-02-08-UnwindSupport.ll deleted file mode 100644 index 393062a..0000000 --- a/test/CodeGen/Generic/2004-02-08-UnwindSupport.ll +++ /dev/null @@ -1,17 +0,0 @@ -; RUN: llc < %s -enable-correct-eh-support - -define i32 @test() { - unwind -} - -define i32 @main() { - %X = invoke i32 @test( ) - to label %cont unwind label %EH ; <i32> [#uses=0] - -cont: ; preds = %0 - ret i32 1 - -EH: ; preds = %0 - ret i32 0 -} - diff --git a/test/CodeGen/Generic/2007-02-25-invoke.ll b/test/CodeGen/Generic/2007-02-25-invoke.ll index 6e20eaa..7850cec 100644 --- a/test/CodeGen/Generic/2007-02-25-invoke.ll +++ b/test/CodeGen/Generic/2007-02-25-invoke.ll @@ -8,5 +8,9 @@ define i32 @test2() { invcont: ret i32 %A blat: - ret i32 0 + %lpad = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup + ret i32 0 } + +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll index 2a2cf6c..407696f 100644 --- a/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll +++ b/test/CodeGen/Generic/2007-04-30-LandingPadBranchFolding.ll @@ -45,7 +45,9 @@ cond_next1328: ; preds = %cond_true235, %cond_true ret void cond_true1402: ; preds = %invcont282, %cond_false280, %cond_true235, %cond_true - ret void + %lpad = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup + ret void } declare void @_ZNSs14_M_replace_auxEjjjc() @@ -57,3 +59,5 @@ declare void @_ZNSs6assignEPKcj() declare void @_ZNSs7reserveEj() declare void @_ZNSs6appendEPKcj() + +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll index 5df2200..27c7162 100644 --- a/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll +++ b/test/CodeGen/Generic/2007-12-17-InvokeAsm.ll @@ -2,12 +2,16 @@ define fastcc void @bc__support__high_resolution_time__initialize_clock_rate() { entry: - invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) - to label %.noexc unwind label %cleanup144 + invoke void asm "rdtsc\0A\09movl %eax, $0\0A\09movl %edx, $1", "=*imr,=*imr,~{dirflag},~{fpsr},~{flags},~{dx},~{ax}"( i32* null, i32* null ) + to label %.noexc unwind label %cleanup144 .noexc: ; preds = %entry - ret void + ret void cleanup144: ; preds = %entry - unwind + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup + resume { i8*, i32 } %exn } + +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll b/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll index 00e027b..943ed88 100644 --- a/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll +++ b/test/CodeGen/Generic/2007-12-31-UnusedSelector.ll @@ -14,11 +14,14 @@ bb14: ; preds = %lpad unreachable lpad: ; preds = %entry + %lpad1 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8* null invoke void @__cxa_end_catch( ) to label %bb14 unwind label %lpad17 lpad17: ; preds = %lpad - %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector.i32( i8* null, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i8* null ) ; <i32> [#uses=0] + %lpad2 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8* null unreachable UnifiedUnreachableBlock: ; preds = %entry diff --git a/test/CodeGen/Generic/2009-06-03-UnreachableSplitPad.ll b/test/CodeGen/Generic/2009-06-03-UnreachableSplitPad.ll index 112cac4..ad418f7 100644 --- a/test/CodeGen/Generic/2009-06-03-UnreachableSplitPad.ll +++ b/test/CodeGen/Generic/2009-06-03-UnreachableSplitPad.ll @@ -11,5 +11,9 @@ dummy: invoke i32 @b() to label %reg unwind label %reg reg: + %lpad = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8* null ret void } + +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll b/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll index 22bd4d7..3cbf4c5 100644 --- a/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll +++ b/test/CodeGen/Generic/2009-11-16-BadKillsCrash.ll @@ -64,10 +64,16 @@ invcont38: ; preds = %invcont25, %bb1.i, lpad: ; preds = %bb.i93, %invcont24, %bb1.i, %invcont8 %__extracted.1 = phi i32 [ 0, %invcont8 ], [ %2, %bb1.i ], [ undef, %bb.i93 ], [ undef, %invcont24 ] ; <i32> [#uses=0] - %eh_ptr = call i8* @llvm.eh.exception() ; <i8*> [#uses=1] + %lpad1 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + catch i8* null + %eh_ptr = extractvalue { i8*, i32 } %lpad1, 0 %6 = call i8* @__cxa_begin_catch(i8* %eh_ptr) nounwind ; <i8*> [#uses=0] unreachable lpad74: ; preds = %entry + %lpad2 = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0 + cleanup unreachable } + +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll b/test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll index cd446d5..da26504 100644 --- a/test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll +++ b/test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll @@ -3,6 +3,9 @@ ; the uses of a copy to a physical register without ignoring non-data ; dependence, PR10220. +; The ARM backend can't handle i256 math at the moment. +; XFAIL: arm + define void @f(i256* nocapture %a, i256* nocapture %b, i256* nocapture %cc, i256* nocapture %dd) nounwind uwtable noinline ssp { entry: %c = load i256* %cc diff --git a/test/CodeGen/Generic/exception-handling.ll b/test/CodeGen/Generic/exception-handling.ll new file mode 100644 index 0000000..376e1f1 --- /dev/null +++ b/test/CodeGen/Generic/exception-handling.ll @@ -0,0 +1,29 @@ +; RUN: llc < %s +; PR10733 +declare void @_Znam() + +define void @_ZNK14gIndexOdometer15AfterExcisionOfERi() uwtable align 2 { +_ZN6Gambit5ArrayIiEC2Ej.exit36: + br label %"9" + +"9": ; preds = %"10", %_ZN6Gambit5ArrayIiEC2Ej.exit36 + %indvar82 = phi i64 [ 0, %_ZN6Gambit5ArrayIiEC2Ej.exit36 ], [ %tmp85, %"10" ] + %tmp85 = add i64 %indvar82, 1 + %tmp = trunc i64 %tmp85 to i32 + invoke void @_ZNK14gIndexOdometer9NoIndicesEv() + to label %"10" unwind label %lpad27 + +"10": ; preds = %"9" + invoke void @_Znam() + to label %"9" unwind label %lpad27 + +lpad27: ; preds = %"10", %"9" + %0 = phi i32 [ undef, %"9" ], [ %tmp, %"10" ] + %1 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gxx_personality_v0 + cleanup + resume { i8*, i32 } zeroinitializer +} + +declare void @_ZNK14gIndexOdometer9NoIndicesEv() + +declare i32 @__gxx_personality_v0(i32, i64, i8*, i8*) diff --git a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll index a3cab5d..e709080 100644 --- a/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll +++ b/test/CodeGen/Generic/multiple-return-values-cross-block-with-invoke.ll @@ -13,6 +13,9 @@ normal: ret void handler: + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + catch i8* null ret void } +declare i32 @__gxx_personality_v0(...) diff --git a/test/CodeGen/Generic/promote-integers.ll b/test/CodeGen/Generic/promote-integers.ll deleted file mode 100644 index 5812592..0000000 --- a/test/CodeGen/Generic/promote-integers.ll +++ /dev/null @@ -1,15 +0,0 @@ -; Test that vectors are scalarized/lowered correctly. -; RUN: llc -march=x86 -promote-elements < %s | FileCheck %s - -; This test is the poster-child for integer-element-promotion. -; Until this feature is complete, we mark this test as expected to fail. -; XFAIL: * -; CHECK: vector_code -; CHECK: ret -define <4 x float> @vector_code(<4 x i64> %A, <4 x i64> %B, <4 x float> %R0, <4 x float> %R1 ) { - %C = icmp eq <4 x i64> %A, %B - %K = xor <4 x i1> <i1 1, i1 1, i1 1, i1 1>, %C - %D = select <4 x i1> %K, <4 x float> %R1, <4 x float> %R0 - ret <4 x float> %D -} - |