[llvm] [AMDGPU] Code clean up and denorm check removal for bf16 omod folding (PR #219042)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 08:02:25 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
----------------
changpeng wrote:
I did not get what does it mean with "omod always flushes them". My understand us that omod itself just scales the result. What is exactly your concern here?
%cos = ftz ...
v_pk_mul_bf16 %cos, 4.0
https://github.com/llvm/llvm-project/pull/219042
More information about the llvm-commits
mailing list