[PATCH] D112827: [AMDGPU][GlobalISel] Fold G_FNEG above when users cannot fold mods
Mirko Brkusanin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 29 09:12:57 PDT 2021
mbrkusanin created this revision.
mbrkusanin added reviewers: foad, arsenm.
mbrkusanin added a project: LLVM.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
mbrkusanin requested review of this revision.
Herald added a subscriber: wdng.
If possible fold fneg into instruction above if users cannot fold mods and we
know it will decrease instruction count.
Follows same logic as SDAG combiner in choosing opportunities to combine.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112827
Files:
llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/lib/Target/AMDGPU/AMDGPUCombine.td
llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-foldable-fneg.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112827.383383.patch
Type: text/x-patch
Size: 42466 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211029/929192d3/attachment.bin>
More information about the llvm-commits
mailing list