From af8fa36bf0cf6a09d6f4d9ad16eab30bc2ec8719 Mon Sep 17 00:00:00 2001 From: Roman Lebedev Date: Thu, 22 Jul 2021 22:59:22 +0300 Subject: [NFCI][TLI] prepare[US]REMEqFold(): don't add nonsensical 'exact' flag to rotates created As pointed out by Craig Topper. --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 71e90c3..79b347b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -5630,10 +5630,8 @@ TargetLowering::prepareUREMEqFold(EVT SETCCVT, SDValue REMNode, // We need ROTR to do this. if (!DCI.isBeforeLegalizeOps() && !isOperationLegalOrCustom(ISD::ROTR, VT)) return SDValue(); - SDNodeFlags Flags; - Flags.setExact(true); // UREM: (rotr (mul N, P), K) - Op0 = DAG.getNode(ISD::ROTR, DL, VT, Op0, KVal, Flags); + Op0 = DAG.getNode(ISD::ROTR, DL, VT, Op0, KVal); Created.push_back(Op0.getNode()); } @@ -5897,10 +5895,8 @@ TargetLowering::prepareSREMEqFold(EVT SETCCVT, SDValue REMNode, // We need ROTR to do this. if (!DCI.isBeforeLegalizeOps() && !isOperationLegalOrCustom(ISD::ROTR, VT)) return SDValue(); - SDNodeFlags Flags; - Flags.setExact(true); // SREM: (rotr (add (mul N, P), A), K) - Op0 = DAG.getNode(ISD::ROTR, DL, VT, Op0, KVal, Flags); + Op0 = DAG.getNode(ISD::ROTR, DL, VT, Op0, KVal); Created.push_back(Op0.getNode()); } -- cgit v1.1