1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
7 define void @bfe_def(i32 addrspace(1)* %out, i32 %x) {
10 %1 = and i32 %0, 15 ; 0xf
11 store i32 %1, i32 addrspace(1)* %out
15 ; This program could be implemented using a BFE_UINT instruction, however
16 ; since the lshr constant + number of bits in the mask is >= 32, it can also be
17 ; implmented with a LSHR instruction, which is better, because LSHR has less
18 ; operands and requires less constants.
22 define void @bfe_shift(i32 addrspace(1)* %out, i32 %x) {
25 %1 = and i32 %0, 65535 ; 0xffff
26 store i32 %1, i32 addrspace(1)* %out