[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
Wed Aug 26 14:53:33 PDT 2026
================
@@ -2522,13 +2523,14 @@ SIFoldOperandsImpl::isOMod(const MachineInstr &MI) const {
if (OMod == SIOutMods::NONE)
return {nullptr, SIOutMods::NONE};
- // Modifiers other than op_sel_hi block OMOD folding
+ // If isOMod is applied to a packed instruction then it only applies to the
+ // low half of the input and output.
----------------
changpeng wrote:
> That is a surprise...
hmm, I need to think it over! Currently only trans bf16 ops support omod. But I believe that is a documentation mistake. Theoretically other bf16 ops (including packed) should also support omod on the same asic. The comment will not be appropriate in that case for packed bf16 omod folding.
https://github.com/llvm/llvm-project/pull/219042
More information about the llvm-commits
mailing list