diff --git a/test/Transforms/InstCombine/vector-casts.ll b/test/Transforms/InstCombine/vector-casts.ll index a73a84ac1e0..c6d1eaa1ff0 100644 --- a/test/Transforms/InstCombine/vector-casts.ll +++ b/test/Transforms/InstCombine/vector-casts.ll @@ -1,15 +1,22 @@ -; RUN: llvm-as < %s | opt -instcombine > %t -; RUN: not grep trunc %t -; RUN: not grep ashr %t +; RUN: llvm-as < %s | opt -instcombine | llvm-dis | FileCheck %s ; This turns into a&1 != 0 -define <2 x i1> @a(<2 x i64> %a) { +define <2 x i1> @test1(<2 x i64> %a) { %t = trunc <2 x i64> %a to <2 x i1> ret <2 x i1> %t + +; CHECK: define <2 x i1> @test1 +; CHECK: and <2 x i64> %a, +; CHECK: icmp ne <2 x i64> %tmp, zeroinitializer } + ; The ashr turns into an lshr. -define <2 x i64> @b(<2 x i64> %a) { +define <2 x i64> @test2(<2 x i64> %a) { %b = and <2 x i64> %a, %t = ashr <2 x i64> %b, ret <2 x i64> %t + +; CHECK: define <2 x i64> @test2 +; CHECK: and <2 x i64> %a, +; CHECK: lshr <2 x i64> %b, }