diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-02 17:52:33 +0000 |
commit | 009b1c42aa6266385f2c37e227516b24077e6dd7 (patch) | |
tree | 64ba909838c23261cace781ece27d106134ea451 /test/Transforms/SimplifyCFG/trapping-load-unreachable.ll |
Notes
Diffstat (limited to 'test/Transforms/SimplifyCFG/trapping-load-unreachable.ll')
-rw-r--r-- | test/Transforms/SimplifyCFG/trapping-load-unreachable.ll | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll b/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll new file mode 100644 index 0000000000000..a73a82b369717 --- /dev/null +++ b/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll @@ -0,0 +1,19 @@ +; RUN: llvm-as < %s | opt -simplifycfg | llvm-dis | grep {volatile load} +; PR2967 + +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" +target triple = "i386-pc-linux-gnu" + +define void @foo(i32 %x) nounwind { +entry: + %0 = icmp eq i32 %x, 0 ; <i1> [#uses=1] + br i1 %0, label %bb, label %return + +bb: ; preds = %entry + %1 = volatile load i32* null ; <i32> [#uses=0] + unreachable + br label %return +return: ; preds = %entry + ret void +} |