[llvm] Revert "AMDGPU: Don't avoid clamp of bit shift in BFE pattern (#115372)" (PR #116091)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 11:24:54 PST 2024
================
@@ -150,39 +150,22 @@ define i32 @bzhi32_c4_commutative(i32 %val, i32 %numlowbits) nounwind {
; ---------------------------------------------------------------------------- ;
define i32 @bzhi32_d0(i32 %val, i32 %numlowbits) nounwind {
-; GCN-LABEL: bzhi32_d0:
----------------
changpeng wrote:
This test is kept now, thanks.
I think the canonical IR test is there in the test:
define i32 @bzhi32_d0(i32 %val, i32 %numlowbits) nounwind {
%numhighbits = sub i32 32, %numlowbits
%highbitscleared = shl i32 %val, %numhighbits
%masked = lshr i32 %highbitscleared, %numhighbits
ret i32 %masked
}
https://github.com/llvm/llvm-project/pull/116091
More information about the llvm-commits
mailing list