aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ConstProp/InsertElement.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/ConstProp/InsertElement.ll')
-rw-r--r--test/Transforms/ConstProp/InsertElement.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/InsertElement.ll b/test/Transforms/ConstProp/InsertElement.ll
new file mode 100644
index 0000000..d249c2e
--- /dev/null
+++ b/test/Transforms/ConstProp/InsertElement.ll
@@ -0,0 +1,12 @@
+; RUN: opt < %s -constprop -S | FileCheck %s
+
+define i32 @test1() {
+ %A = bitcast i32 2139171423 to float
+ %B = insertelement <1 x float> undef, float %A, i32 0
+ %C = extractelement <1 x float> %B, i32 0
+ %D = bitcast float %C to i32
+ ret i32 %D
+; CHECK: @test1
+; CHECK: ret i32 2139171423
+}
+