summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AVR/expand-integer-failure.ll
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2016-11-16 21:58:04 +0000
committerDylan McKay <dylanmckay34@gmail.com>2016-11-16 21:58:04 +0000
commita789f400022f4941e00142d2299e2ca0df695c63 (patch)
tree7f0e04209e3ed202789b0c8eaed3d0005ca27268 /llvm/test/CodeGen/AVR/expand-integer-failure.ll
parente596986a44d1771d01da20d7b702da7fa1c7af15 (diff)
downloadbcm5719-llvm-a789f400022f4941e00142d2299e2ca0df695c63.tar.gz
bcm5719-llvm-a789f400022f4941e00142d2299e2ca0df695c63.zip
[AVR] Add the pseudo instruction expansion pass
Summary: A lot of the pseudo instructions are required because LLVM assumes that all integers of the same size as the pointer size are legal. This means that it will not currently expand 16-bit instructions to their 8-bit variants because it thinks 16-bit types are legal for the operations. This also adds all of the CodeGen tests that required the pass to run. Reviewers: arsenm, kparzysz Subscribers: wdng, mgorny, modocache, llvm-commits Differential Revision: https://reviews.llvm.org/D26577 llvm-svn: 287162
Diffstat (limited to 'llvm/test/CodeGen/AVR/expand-integer-failure.ll')
-rw-r--r--llvm/test/CodeGen/AVR/expand-integer-failure.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AVR/expand-integer-failure.ll b/llvm/test/CodeGen/AVR/expand-integer-failure.ll
new file mode 100644
index 00000000000..cc022c5d6e8
--- /dev/null
+++ b/llvm/test/CodeGen/AVR/expand-integer-failure.ll
@@ -0,0 +1,23 @@
+; RUN: llc < %s -march=avr | FileCheck %s
+; XFAIL: *
+
+; Causes an assertion error
+; Assertion failed: (Lo.getValueType() == TLI.getTypeToTransformTo(*DAG.getContext(), Op.getValueType()) &&
+; Hi.getValueType() == Lo.getValueType() &&
+; "Invalid type for expanded integer"),
+; function SetExpandedInteger
+; file lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
+
+; CHECK-LABEL: foo
+define void @foo(i16 %a) {
+ifcont:
+ %cmp_result = icmp eq i16 %a, 255
+ %bool_result = uitofp i1 %cmp_result to double
+ %result = fcmp one double 0.000000e+00, %bool_result
+ br i1 %result, label %then, label %else
+then:
+ ret void
+else:
+ ret void
+}
+
OpenPOWER on IntegriCloud