[llvm] AMDGPU/GlobalISel: add RegBankLegalize rules for bitfield extract (PR #132381)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 04:50:43 PDT 2025
================
@@ -127,6 +131,120 @@ void RegBankLegalizeHelper::widenLoad(MachineInstr &MI, LLT WideTy,
MI.eraseFromParent();
}
+bool isSignedBFE(MachineInstr &MI) {
+ if (isa<GIntrinsic>(MI)) {
+ switch (MI.getOperand(1).getIntrinsicID()) {
+ case Intrinsic::amdgcn_sbfe:
+ return true;
+ case Intrinsic::amdgcn_ubfe:
+ return false;
----------------
arsenm wrote:
Don't really need to handle the false cases. Just the two positives
https://github.com/llvm/llvm-project/pull/132381
More information about the llvm-commits
mailing list