[PATCH] D142424: DAG: Relax foldBitcastedFPLogic conditions

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 17:12:13 PST 2023


arsenm created this revision.
arsenm added reviewers: bogner, nemanjai, spatel, RKSimon.
Herald added subscribers: bzcheeseman, kosarev, StephenFan, ecnelises, kerbowa, hiraditya, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Requiring a bitcast to exist was unhelpful. The most basic cases
are always going to be a CopyFromReg or load, so they would need
a new cast inserted.

We should also get rid of this hasBitPreservingFPLogic hook. fabs/fneg
are bitpreserving or incorrectly implemented, so this should just be a
regular legality check.


https://reviews.llvm.org/D142424

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/fneg-modifier-casting.ll
  llvm/test/CodeGen/AMDGPU/fneg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142424.491566.patch
Type: text/x-patch
Size: 5381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230124/48f3169e/attachment.bin>


More information about the llvm-commits mailing list