summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorStephen Canon <scanon@apple.com>2018-07-19 22:46:42 +0000
committerStephen Canon <scanon@apple.com>2018-07-19 22:46:42 +0000
commit8995c5f0f617769edbfb3e7c8510957feaa27501 (patch)
tree5092f76d1fb5eea7bff5d76ceec38460a5723a4a /llvm/test
parentdf81b979271c950811260bfd55609f116b80ec4a (diff)
downloadbcm5719-llvm-8995c5f0f617769edbfb3e7c8510957feaa27501.tar.gz
bcm5719-llvm-8995c5f0f617769edbfb3e7c8510957feaa27501.zip
Skip out of SimplifyDemandedBits for BITCAST of f16 to i16
Mirrors the existing exit path for f128, avoiding a crash later on. Differential Revision: https://reviews.llvm.org/D49524 llvm-svn: 337506
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/pr38038.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr38038.ll b/llvm/test/CodeGen/X86/pr38038.ll
new file mode 100644
index 00000000000..42ade7c5a76
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr38038.ll
@@ -0,0 +1,10 @@
+; RUN: llc < %s
+; PR38038
+
+define i8 @crash(half) {
+entry:
+ %1 = bitcast half %0 to i16
+ %.lobit = lshr i16 %1, 15
+ %2 = trunc i16 %.lobit to i8
+ ret i8 %2
+}
OpenPOWER on IntegriCloud