[llvm-branch-commits] [clang] [llvm] [AMDGPU] Disable generic DAG combines at -O0 to preserve debuggability. (PR #176304)
Daniil Fukalov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Jan 16 19:34:26 PST 2026
================
@@ -872,6 +872,13 @@ bool AMDGPUTargetLowering::shouldReduceLoadWidth(
return (OldSize < 32);
}
+bool AMDGPUTargetLowering::shouldExpandPowerOf2DivRem(EVT VT) const {
+ // At -O0 we disable DAG combines, so power-of-2 div/rem won't be
----------------
dfukalov wrote:
@arsenm I'm also not sure which can be better solution. I can imagine these approaches, but I'm not sure I prefer one of them:
- Modify ExpandIRInsts to always expand power-of-2 div/rem
- Handle power-of-2 expansion in AMDGPUISelLowering::LowerDIVREM
- Adjust MaxLegalDivRemBitWidth for AMDGPU at -O0
https://github.com/llvm/llvm-project/pull/176304
More information about the llvm-branch-commits
mailing list