[llvm] [AMDGPU] Code clean up and denorm check removal for bf16 omod folding (PR #219042)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 28 01:48:16 PDT 2026
================
@@ -2505,8 +2505,9 @@ SIFoldOperandsImpl::isOMod(const MachineInstr &MI) const {
}
case AMDGPU::V_PK_MUL_BF16: {
// OMOD folding for BF16 packed multiply
- if (MFI->getMode().FP32Denormals.Output != DenormalMode::PreserveSign ||
- MI.mayRaiseFPException())
+ // PK_*_BF16 ignores DENORM controls, and always preserves denorms
----------------
jayfoad wrote:
> If I understand it correctly omod simply adds to the exponential and does nothing else. So, it almost guaranteed to produce a denorm. Correct me if I am wrong.
The docs say that OMOD flushes output denorms, so either you're wrong or the docs are wrnog :)
https://github.com/llvm/llvm-project/pull/219042
More information about the llvm-commits
mailing list