[PATCH] D117032: GlobalIsel: Fix fma combine when one of the uses comes from unmerge

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 07:17:31 PST 2022


Petar.Avramovic updated this revision to Diff 399319.
Petar.Avramovic added a comment.

Previous version already had llvm-ir test with fma pattern covered in matchCombineFAddFMulToFMadOrFMA.
Cover remaining potential errors when MRI.getVRegDef(Reg)->getOperand(0).getReg() is used. Adding targeted mir tests for all these cases.
I don't have llvm-ir tests for these since they seem to combine before legalizer, unmerges that causes bad combine are generated in legalizer.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117032/new/

https://reviews.llvm.org/D117032

Files:
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul-post-legalize.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-unmerge-values.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117032.399319.patch
Type: text/x-patch
Size: 37933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/420f6b4a/attachment.bin>


More information about the llvm-commits mailing list