[PATCH] D151934: InstCombine: Recognize fneg when performed as bitcasted integer

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 14:01:01 PDT 2023


arsenm created this revision.
arsenm added reviewers: foad, jcranmer-intel, spatel, aarzee, scanon, majnemer, mehdi_amini, nikic, andrew.w.kaylor, sepavloff, resistor, efriedma.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This is a resurrection of D18874 <https://reviews.llvm.org/D18874>. This was previously wrong with
fneg conflated with fsub, but we now have a proper fneg instruction.
Additionally, I think it is now clearer that IR float=IEEE float,
and a different bit layout would require adding a different IR type.


https://reviews.llvm.org/D151934

Files:
  llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  llvm/test/Transforms/InstCombine/fneg-as-int.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151934.527604.patch
Type: text/x-patch
Size: 8774 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230601/7e43f6cb/attachment.bin>


More information about the llvm-commits mailing list