diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/vec-single-elt.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/vec-single-elt.ll b/test/Transforms/InstCombine/vec-single-elt.ll new file mode 100644 index 0000000..45bca42 --- /dev/null +++ b/test/Transforms/InstCombine/vec-single-elt.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep element +; insert/extractelement should canonicalize to bitcast + +define i64 @a(<1 x i64> %x) { + %r = extractelement <1 x i64> %x, i32 0 + ret i64 %r +} + +define <1 x i64> @b(i64 %x) { + %r = insertelement <1 x i64> undef, i64 %x, i32 0 + ret <1 x i64> %r +} |