diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-11-10 14:19:45 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-11-10 14:19:45 +0000 |
| commit | 87f38fa85cbdc5ef979d6fc463733716863c481e (patch) | |
| tree | 7541b5cc65d6fb2909eb5cb8765f9ea8364c8711 /llvm/test/CodeGen/X86 | |
| parent | f5a0ef97f5650b4c656292d21de6f4e106895408 (diff) | |
| download | bcm5719-llvm-87f38fa85cbdc5ef979d6fc463733716863c481e.tar.gz bcm5719-llvm-87f38fa85cbdc5ef979d6fc463733716863c481e.zip | |
[DAGCombiner] Show missed opportunity to UNDEF out-of-range SHL
Fails to match constant shift value due to presence of AND mask.
llvm-svn: 286452
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/combine-shl.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/combine-shl.ll b/llvm/test/CodeGen/X86/combine-shl.ll index 64ed1cea8d4..a35a30927a8 100644 --- a/llvm/test/CodeGen/X86/combine-shl.ll +++ b/llvm/test/CodeGen/X86/combine-shl.ll @@ -44,6 +44,21 @@ define <4 x i32> @combine_vec_shl_outofrange1(<4 x i32> %x) { ret <4 x i32> %1 } +define <4 x i32> @combine_vec_shl_outofrange2(<4 x i32> %a0) { +; SSE-LABEL: combine_vec_shl_outofrange2: +; SSE: # BB#0: +; SSE-NEXT: xorps %xmm0, %xmm0 +; SSE-NEXT: retq +; +; AVX-LABEL: combine_vec_shl_outofrange2: +; AVX: # BB#0: +; AVX-NEXT: vxorps %xmm0, %xmm0, %xmm0 +; AVX-NEXT: retq + %1 = and <4 x i32> %a0, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647> + %2 = shl <4 x i32> %1, <i32 33, i32 33, i32 33, i32 33> + ret <4 x i32> %2 +} + ; fold (shl x, 0) -> x define <4 x i32> @combine_vec_shl_by_zero(<4 x i32> %x) { ; SSE-LABEL: combine_vec_shl_by_zero: |

