aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/GVNPRE/cast.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/GVNPRE/cast.ll')
-rw-r--r--test/Transforms/GVNPRE/cast.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/GVNPRE/cast.ll b/test/Transforms/GVNPRE/cast.ll
new file mode 100644
index 0000000..3536a14
--- /dev/null
+++ b/test/Transforms/GVNPRE/cast.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as < %s | opt -gvnpre | llvm-dis | grep b.gvnpre
+
+define i32 @extract() {
+entry: ; preds = %cond_false, %entry
+ br i1 true, label %cond_true, label %cond_false
+
+cond_true:
+ br label %end
+
+cond_false:
+ %a = sext i16 0 to i32
+ br label %end
+
+end:
+ %b = sext i16 0 to i32
+ ret i32 %b
+}