[PATCH] D149715: IR: Add llvm.frexp intrinsic

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 23 03:00:53 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2558
+
+  SDValue ExpMaskScaled =
+      DAG.getNode(ISD::AND, dl, AsIntVT, ScaledAsInt, ExpMask);
----------------
sepavloff wrote:
> This value is used only `SELECT`, which is then shifted right. Can it be dropped?
Not sure I follow, you would have to shift the other operand of the select too. 

I got here by running the C implementation through the optimizer and translating from IR up to the DAG nodes. I'm trusting the IR's canonicalization decisions. 


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

https://reviews.llvm.org/D149715



More information about the llvm-commits mailing list