diff options
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r-- | llvm/test/CodeGen/X86/vshift_scalar.ll | 11 | ||||
-rw-r--r-- | llvm/test/CodeGen/X86/vshift_split2.ll | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/vshift_scalar.ll b/llvm/test/CodeGen/X86/vshift_scalar.ll new file mode 100644 index 00000000000..8895cdf8aff --- /dev/null +++ b/llvm/test/CodeGen/X86/vshift_scalar.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc + +; Legalization test that requires scalarizing a vector. + +define void @update(<1 x i32> %val, <1 x i32>* %dst) nounwind { +entry: + %shl = shl <1 x i32> %val, < i32 2> + %shr = ashr <1 x i32> %val, < i32 4> + store <1 x i32> %shr, <1 x i32>* %dst + ret void +} diff --git a/llvm/test/CodeGen/X86/vshift_split2.ll b/llvm/test/CodeGen/X86/vshift_split2.ll new file mode 100644 index 00000000000..356e0fd1a64 --- /dev/null +++ b/llvm/test/CodeGen/X86/vshift_split2.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc + +; Legalization example that requires splitting a large vector into smaller pieces. + +define void @update(<8 x i32> %val, <8 x i32>* %dst) nounwind { +entry: + %shl = shl <8 x i32> %val, < i32 2, i32 2, i32 2, i32 2, i32 4, i32 4, i32 4, i32 4 > + %shr = ashr <8 x i32> %val, < i32 2, i32 2, i32 2, i32 2, i32 4, i32 4, i32 4, i32 4 > + store <8 x i32> %shr, <8 x i32>* %dst + ret void +} |