diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-10 04:31:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-10 04:31:42 +0000 |
commit | 31985c7d2a8e8c4d14e29904d072e1936dd0b6bb (patch) | |
tree | d3e1aa04de60d4d8a4a1f8ca77ea00628cf7bf29 /test | |
parent | de5085a66adc45ba2eb53202eaa57cc52343315a (diff) | |
download | external_llvm-31985c7d2a8e8c4d14e29904d072e1936dd0b6bb.zip external_llvm-31985c7d2a8e8c4d14e29904d072e1936dd0b6bb.tar.gz external_llvm-31985c7d2a8e8c4d14e29904d072e1936dd0b6bb.tar.bz2 |
Merging r196806:
------------------------------------------------------------------------
r196806 | apazos | 2013-12-09 11:29:14 -0800 (Mon, 09 Dec 2013) | 11 lines
Fix pattern match for movi with 0D result
Patch by Jiangning Liu.
With some test case changes:
- intrinsic test added to the existing /test/CodeGen/AArch64/neon-aba-abd.ll.
- New test cases to cover movi 1D scenario without using the intrinsic in
test/CodeGen/AArch64/neon-mov.ll.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/AArch64/neon-aba-abd.ll | 10 | ||||
-rw-r--r-- | test/CodeGen/AArch64/neon-mov.ll | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/neon-aba-abd.ll b/test/CodeGen/AArch64/neon-aba-abd.ll index ee22a45..5400984 100644 --- a/test/CodeGen/AArch64/neon-aba-abd.ll +++ b/test/CodeGen/AArch64/neon-aba-abd.ll @@ -157,6 +157,16 @@ define <2 x i32> @test_sabd_v2i32(<2 x i32> %lhs, <2 x i32> %rhs) { ret <2 x i32> %abd } +define <2 x i32> @test_sabd_v2i32_const() { +; CHECK: test_sabd_v2i32_const: +; CHECK: movi d1, #0xffffffff0000 +; CHECK-NEXT: sabd v0.2s, v0.2s, v1.2s + %1 = tail call <2 x i32> @llvm.arm.neon.vabds.v2i32( + <2 x i32> <i32 -2147483648, i32 2147450880>, + <2 x i32> <i32 -65536, i32 65535>) + ret <2 x i32> %1 +} + define <2 x i32> @test_saba_v2i32(<2 x i32> %lhs, <2 x i32> %rhs) { ; CHECK: test_saba_v2i32: %abd = call <2 x i32> @llvm.arm.neon.vabds.v2i32(<2 x i32> %lhs, <2 x i32> %rhs) diff --git a/test/CodeGen/AArch64/neon-mov.ll b/test/CodeGen/AArch64/neon-mov.ll index 42f6a89..60b13b8 100644 --- a/test/CodeGen/AArch64/neon-mov.ll +++ b/test/CodeGen/AArch64/neon-mov.ll @@ -202,4 +202,16 @@ define <2 x double> @fmov2d() { ret <2 x double> < double -1.2e1, double -1.2e1> } +define <2 x i32> @movi1d_1() { +; CHECK: movi d0, #0xffffffff0000 + ret <2 x i32> < i32 -65536, i32 65535> +} + + +declare <2 x i32> @test_movi1d(<2 x i32>, <2 x i32>) +define <2 x i32> @movi1d() { +; CHECK: movi d1, #0xffffffff0000 + %1 = tail call <2 x i32> @test_movi1d(<2 x i32> <i32 -2147483648, i32 2147450880>, <2 x i32> <i32 -65536, i32 65535>) + ret <2 x i32> %1 +} |