Skip to content

Commit cc35069

Browse files
committed
fix: review
1 parent b2c46c7 commit cc35069

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5681,13 +5681,6 @@ class LLVM_ABI TargetLowering : public TargetLoweringBase {
56815681
/// only the first Count elements of the vector are used.
56825682
SDValue expandVecReduce(SDNode *Node, SelectionDAG &DAG) const;
56835683

5684-
/// This implements llvm.canonicalize.f* by multiplication with 1.0, as
5685-
/// suggested in
5686-
/// https://llvm.org/docs/LangRef.html#llvm-canonicalize-intrinsic.
5687-
/// It uses strict_fp operations even outside a strict_fp context in order
5688-
/// to guarantee that the canonicalization is not optimized away by later
5689-
/// passes. The result chain introduced by that is intentionally ignored
5690-
/// since no ordering requirement is intended here.
56915684
SDValue expandFCanonicalizeWithStrictFmul(SDNode *Node, SDLoc DL,
56925685
SelectionDAG &DAG) const;
56935686

llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,6 @@ void VectorLegalizer::Expand(SDNode *Node, SmallVectorImpl<SDValue> &Results) {
13101310
}
13111311
break;
13121312
case ISD::FCANONICALIZE: {
1313-
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
13141313
SDLoc dl(Node);
13151314
SDValue Result = TLI.expandFCanonicalizeWithStrictFmul(Node, dl, DAG);
13161315
Results.push_back(Result);

llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11584,6 +11584,14 @@ SDValue TargetLowering::expandVecReduce(SDNode *Node, SelectionDAG &DAG) const {
1158411584
SDValue
1158511585
TargetLowering::expandFCanonicalizeWithStrictFmul(SDNode *Node, SDLoc DL,
1158611586
SelectionDAG &DAG) const {
11587+
// This implements llvm.canonicalize.f* by multiplication with 1.0, as
11588+
// suggested in
11589+
// https://llvm.org/docs/LangRef.html#llvm-canonicalize-intrinsic.
11590+
// It uses strict_fp operations even outside a strict_fp context in order
11591+
// to guarantee that the canonicalization is not optimized away by later
11592+
// passes. The result chain introduced by that is intentionally ignored
11593+
// since no ordering requirement is intended here.
11594+
1158711595
// Create strict multiplication by 1.0.
1158811596
SDValue Operand = Node->getOperand(0);
1158911597
EVT VT = Operand.getValueType();

0 commit comments

Comments
 (0)