diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/shift-i128.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/shift-i128.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/shift-i128.ll b/llvm/test/CodeGen/X86/shift-i128.ll index aef923f8d10..1de99b15e42 100644 --- a/llvm/test/CodeGen/X86/shift-i128.ll +++ b/llvm/test/CodeGen/X86/shift-i128.ll @@ -116,3 +116,21 @@ entry: store <2 x i128> %1, <2 x i128>* %r, align 16 ret void } + +; +; Combines +; + +define <2 x i256> @shl_sext_shl_outofrange(<2 x i128> %a0) { + %1 = shl <2 x i128> %a0, <i128 -1, i128 -1> + %2 = sext <2 x i128> %1 to <2 x i256> + %3 = shl <2 x i256> %2, <i256 128, i256 128> + ret <2 x i256> %3 +} + +define <2 x i256> @shl_zext_shl_outofrange(<2 x i128> %a0) { + %1 = shl <2 x i128> %a0, <i128 -1, i128 -1> + %2 = zext <2 x i128> %1 to <2 x i256> + %3 = shl <2 x i256> %2, <i256 128, i256 128> + ret <2 x i256> %3 +} |