summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorTim Northover <t.p.northover@gmail.com>2020-01-09 14:28:48 +0000
committerTim Northover <t.p.northover@gmail.com>2020-01-14 13:41:32 +0000
commit77cc690bae310f4cba0a34f2da8a37a7c9a10a82 (patch)
tree2f5a775dd489f15d5b7142d976848b34def949fa /llvm/test/Bitcode
parentcfe2fab708de3a1d8e05a829a132f335a189acc9 (diff)
downloadbcm5719-llvm-77cc690bae310f4cba0a34f2da8a37a7c9a10a82.tar.gz
bcm5719-llvm-77cc690bae310f4cba0a34f2da8a37a7c9a10a82.zip
AArch64: fix bitcode upgrade of @llvm.neon.addp.
We were upgrading it to faddp, but a version taking two type parameters instead of one. This then got upgraded a second time to the version with just one parameter, but occasionally (for reasons I don't understand) this unusual two-stage process corrupted a use-list, leading to a crash when the two faddp declarations didn't match.
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/aarch64-addp-upgrade.bcbin0 -> 1136 bytes
-rw-r--r--llvm/test/Bitcode/aarch64-addp-upgrade.ll18
2 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/aarch64-addp-upgrade.bc b/llvm/test/Bitcode/aarch64-addp-upgrade.bc
new file mode 100644
index 00000000000..a359b445f17
--- /dev/null
+++ b/llvm/test/Bitcode/aarch64-addp-upgrade.bc
Binary files differ
diff --git a/llvm/test/Bitcode/aarch64-addp-upgrade.ll b/llvm/test/Bitcode/aarch64-addp-upgrade.ll
new file mode 100644
index 00000000000..4e78996aa0b
--- /dev/null
+++ b/llvm/test/Bitcode/aarch64-addp-upgrade.ll
@@ -0,0 +1,18 @@
+; RUN: llvm-dis %p/aarch64-addp-upgrade.bc -o - | FileCheck %s
+
+; Bitcode was generated from file below, which may or may not even assemble any
+; more.
+
+; CHECK: call <2 x float> @llvm.aarch64.neon.faddp.v2f32(<2 x float> %lhs, <2 x float> %rhs)
+define <2 x float> @test_addp(<2 x float> %lhs, <2 x float> %rhs) {
+ %res = call <2 x float> @llvm.aarch64.neon.addp.v2f32(<2 x float> %lhs, <2 x float> %rhs)
+ ret <2 x float> %res
+}
+
+; CHECK: call <2 x float> @llvm.aarch64.neon.faddp.v2f32(<2 x float> %lhs, <2 x float> %rhs)
+define <2 x float> @test_addp1(<2 x float> %lhs, <2 x float> %rhs) {
+ %res = call <2 x float> @llvm.aarch64.neon.addp.v2f32(<2 x float> %lhs, <2 x float> %rhs)
+ ret <2 x float> %res
+}
+
+declare <2 x float> @llvm.aarch64.neon.addp.v2f32(<2 x float>, <2 x float>)
OpenPOWER on IntegriCloud