diff options
Diffstat (limited to 'test/CodeGen/R600/anyext.ll')
-rw-r--r-- | test/CodeGen/R600/anyext.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/R600/anyext.ll b/test/CodeGen/R600/anyext.ll new file mode 100644 index 0000000..bbe5d0a --- /dev/null +++ b/test/CodeGen/R600/anyext.ll @@ -0,0 +1,14 @@ +; RUN: llc < %s -march=r600 -mcpu=verde -verify-machineinstrs | FileCheck %s + +; CHECK-LABEL: @anyext_i1_i32 +; CHECK: V_CNDMASK_B32_e64 +define void @anyext_i1_i32(i32 addrspace(1)* %out, i32 %cond) { +entry: + %0 = icmp eq i32 %cond, 0 + %1 = zext i1 %0 to i8 + %2 = xor i8 %1, -1 + %3 = and i8 %2, 1 + %4 = zext i8 %3 to i32 + store i32 %4, i32 addrspace(1)* %out + ret void +} |