summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2018-01-27 07:07:20 +0000
committerAmara Emerson <aemerson@apple.com>2018-01-27 07:07:20 +0000
commit77a5c965607757d3c0f7e83525a41f655bb5db89 (patch)
treecbaf0b35447e80b74083b5e58a094d97a77a9df9 /llvm/test
parentf86be121820b6f133b3fa609c4188756f370f3f1 (diff)
downloadbcm5719-llvm-77a5c965607757d3c0f7e83525a41f655bb5db89.tar.gz
bcm5719-llvm-77a5c965607757d3c0f7e83525a41f655bb5db89.zip
[GlobalISel][Legalizer] Convert the FP constants to the right APFloat type for G_FCONSTANT.
We weren't converting the immediate ConstantFP during legalization, which caused the wrong bit patterns to be emitted for half type FP constants. Fixes PR36106. llvm-svn: 323582
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
index 4ed84ed79bb..c3ed3316ad3 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/legalize-constant.mir
@@ -75,7 +75,7 @@ body: |
; CHECK: %w0 = COPY [[C]](s32)
; CHECK: [[C1:%[0-9]+]]:_(s64) = G_FCONSTANT double 2.000000e+00
; CHECK: %x0 = COPY [[C1]](s64)
- ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_FCONSTANT half 0xH0000
+ ; CHECK: [[C2:%[0-9]+]]:_(s32) = G_FCONSTANT float 0.000000e+00
; CHECK: [[FPTRUNC:%[0-9]+]]:_(s16) = G_FPTRUNC [[C2]](s32)
; CHECK: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FPTRUNC]](s16)
; CHECK: %w0 = COPY [[ANYEXT]](s32)
OpenPOWER on IntegriCloud