[llvm] [SDAG] Reverse the canonicalization of isInf/isNanOrInf (PR #81404)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 19:31:28 PST 2024


================
@@ -3467,12 +3467,51 @@ void SelectionDAGBuilder::visitICmp(const User &I) {
   setValue(&I, DAG.getSetCC(getCurSDLoc(), DestVT, Op1, Op2, Opcode));
 }
 
+SDValue SelectionDAGBuilder::lowerIsFpClass(Value *ClassVal,
----------------
arsenm wrote:

I don't feel great about having SelectionDAGBuilder perform random optimizations. I can see the appeal of reusing the IR implementation of fcmpToClassTest. You would also need to reimplement the same thing in GlobalISel.

Maybe it would be better to do this in CodeGenPrepare?

https://github.com/llvm/llvm-project/pull/81404


More information about the llvm-commits mailing list