llvm.org GIT mirror llvm / 5f71aee
Merging r200830: ------------------------------------------------------------------------ r200830 | michel.daenzer | 2014-02-05 01:48:05 -0800 (Wed, 05 Feb 2014) | 8 lines R600/SI: Add pattern for zero-extending i1 to i32 Fixes opencl-example if_* tests with radeonsi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74469 Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@204646 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 6 years ago
2 changed file(s) with 15 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
18171817 (V_CNDMASK_B32_e64 (i32 0), (i32 -1), $src0)
18181818 >;
18191819
1820 def : Pat <
1821 (i32 (zext i1:$src0)),
1822 (V_CNDMASK_B32_e64 (i32 0), (i32 1), $src0)
1823 >;
1824
18201825 // 1. Offset as 8bit DWORD immediate
18211826 def : Pat <
18221827 (SIload_constant i128:$sbase, IMM8bitDWORD:$offset),
1515 store i64 %2, i64 addrspace(1)* %out
1616 ret void
1717 }
18
19 ; SI-CHECK-LABEL: @testi1toi32
20 ; SI-CHECK: V_CNDMASK_B32
21 define void @testi1toi32(i32 addrspace(1)* %out, i32 %a, i32 %b) {
22 entry:
23 %0 = icmp eq i32 %a, %b
24 %1 = zext i1 %0 to i32
25 store i32 %1, i32 addrspace(1)* %out
26 ret void
27 }