summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll')
-rw-r--r--test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll b/test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll
new file mode 100644
index 0000000..b785a8f
--- /dev/null
+++ b/test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll
@@ -0,0 +1,8 @@
+; RUN: llc -march=aarch64 -mcpu=bogus -o - %s
+
+; Fix the bug in PR20557. Set mcpu to a bogus name, llc will crash in type
+; legalization.
+define <4 x float> @fneg4(<4 x float> %x) {
+ %sub = fsub <4 x float> zeroinitializer, %x
+ ret <4 x float> %sub
+}