summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/ConstProp/insertvalue.ll
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-12-09 21:21:07 +0000
committerJustin Bogner <mail@justinbogner.com>2015-12-09 21:21:07 +0000
commitb7389d6714f8f4e46a28b90aa4a103f0586a08ab (patch)
tree27f218758cfc34dd1ba5c5969cb58f048b416d3d /llvm/test/Transforms/ConstProp/insertvalue.ll
parentdb51357c113ac1e65d22ac5e4199f0a7857b88bf (diff)
downloadbcm5719-llvm-b7389d6714f8f4e46a28b90aa4a103f0586a08ab.tar.gz
bcm5719-llvm-b7389d6714f8f4e46a28b90aa4a103f0586a08ab.zip
IR: Make ConstantDataArray::getFP actually return a ConstantDataArray
The ConstantDataArray::getFP(LLVMContext &, ArrayRef<uint16_t>) overload has had a typo in it since it was written, where it will create a Vector instead of an Array. This obviously doesn't work at all, but it turns out that until r254991 there weren't actually any callers of this overload. Fix the typo and add some test coverage. llvm-svn: 255157
Diffstat (limited to 'llvm/test/Transforms/ConstProp/insertvalue.ll')
-rw-r--r--llvm/test/Transforms/ConstProp/insertvalue.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/ConstProp/insertvalue.ll b/llvm/test/Transforms/ConstProp/insertvalue.ll
index dce2b728b93..606f7ddc679 100644
--- a/llvm/test/Transforms/ConstProp/insertvalue.ll
+++ b/llvm/test/Transforms/ConstProp/insertvalue.ll
@@ -74,3 +74,13 @@ define i32 @test-float-Nan() {
; CHECK: @test-float-Nan
; CHECK: ret i32 2139171423
}
+
+define i16 @test-half-Nan() {
+ %A = bitcast i16 32256 to half
+ %B = insertvalue [1 x half] undef, half %A, 0
+ %C = extractvalue [1 x half] %B, 0
+ %D = bitcast half %C to i16
+ ret i16 %D
+; CHECK: @test-half-Nan
+; CHECK: ret i16 32256
+}
OpenPOWER on IntegriCloud