diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-01 04:38:36 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-01 04:38:36 +0000 |
commit | 243896adcf7c22bb54ce136b0e89fa1fa8c4925f (patch) | |
tree | d5fdb20cd98ea66f6cee701d40ef591c75a70890 /test/CodeGen/AArch64/neon-diagnostics.ll | |
parent | d894c68af6f4a8fd9a7334bc74fcd4386a6b12b9 (diff) | |
download | external_llvm-243896adcf7c22bb54ce136b0e89fa1fa8c4925f.tar.gz external_llvm-243896adcf7c22bb54ce136b0e89fa1fa8c4925f.tar.bz2 external_llvm-243896adcf7c22bb54ce136b0e89fa1fa8c4925f.zip |
Merging r195941:
------------------------------------------------------------------------
r195941 | haoliu | 2013-11-28 18:11:22 -0800 (Thu, 28 Nov 2013) | 4 lines
AArch64: The pattern match should check the range of the immediate value.
Or we can generate some illegal instructions.
E.g. shrn2 v0.4s, v1.2d, #35. The legal range should be in [1, 16].
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/AArch64/neon-diagnostics.ll')
-rw-r--r-- | test/CodeGen/AArch64/neon-diagnostics.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/neon-diagnostics.ll b/test/CodeGen/AArch64/neon-diagnostics.ll index 1de1cfade5..f546aa7d33 100644 --- a/test/CodeGen/AArch64/neon-diagnostics.ll +++ b/test/CodeGen/AArch64/neon-diagnostics.ll @@ -11,3 +11,14 @@ entry: ret <2 x float> %add } +define <4 x i32> @test_vshrn_not_match(<2 x i32> %a, <2 x i64> %b) { +; CHECK: test_vshrn_not_match +; CHECK-NOT: shrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #35 + %1 = bitcast <2 x i32> %a to <1 x i64> + %2 = ashr <2 x i64> %b, <i64 35, i64 35> + %vshrn_n = trunc <2 x i64> %2 to <2 x i32> + %3 = bitcast <2 x i32> %vshrn_n to <1 x i64> + %shuffle.i = shufflevector <1 x i64> %1, <1 x i64> %3, <2 x i32> <i32 0, i32 1> + %4 = bitcast <2 x i64> %shuffle.i to <4 x i32> + ret <4 x i32> %4 +}
\ No newline at end of file |