1; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s 2 3 4; CHECK: bfe0 5define i32 @bfe0(i32 %a) { 6; CHECK: bfe.u32 %r{{[0-9]+}}, %r{{[0-9]+}}, 4, 4 7; CHECK-NOT: shr 8; CHECK-NOT: and 9 %val0 = ashr i32 %a, 4 10 %val1 = and i32 %val0, 15 11 ret i32 %val1 12} 13 14; CHECK: bfe1 15define i32 @bfe1(i32 %a) { 16; CHECK: bfe.u32 %r{{[0-9]+}}, %r{{[0-9]+}}, 3, 3 17; CHECK-NOT: shr 18; CHECK-NOT: and 19 %val0 = ashr i32 %a, 3 20 %val1 = and i32 %val0, 7 21 ret i32 %val1 22} 23 24; CHECK: bfe2 25define i32 @bfe2(i32 %a) { 26; CHECK: bfe.u32 %r{{[0-9]+}}, %r{{[0-9]+}}, 5, 3 27; CHECK-NOT: shr 28; CHECK-NOT: and 29 %val0 = ashr i32 %a, 5 30 %val1 = and i32 %val0, 7 31 ret i32 %val1 32} 33