[DAGCombiner] Use TLI field already available. NFC
authorPaweł Bylica <chfast@gmail.com>
Thu, 14 Nov 2019 11:44:57 +0000 (12:44 +0100)
committerPaweł Bylica <chfast@gmail.com>
Thu, 14 Nov 2019 13:02:52 +0000 (14:02 +0100)
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 9e9be97c665ac92b4188612365aa108505b13577..46c1b8b280749a0edda85780a1c185aa0add464d 100644 (file)
@@ -4225,7 +4225,6 @@ SDValue DAGCombiner::visitIMINMAX(SDNode *N) {
   // Is sign bits are zero, flip between UMIN/UMAX and SMIN/SMAX.
   // Only do this if the current op isn't legal and the flipped is.
   unsigned Opcode = N->getOpcode();
-  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
   if (!TLI.isOperationLegal(Opcode, VT) &&
       (N0.isUndef() || DAG.SignBitIsZero(N0)) &&
       (N1.isUndef() || DAG.SignBitIsZero(N1))) {
@@ -6491,7 +6490,6 @@ SDValue DAGCombiner::MatchStoreCombine(StoreSDNode *N) {
   if (VT != MVT::i16 && VT != MVT::i32 && VT != MVT::i64)
     return SDValue();
 
-  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
   if (LegalOperations && !TLI.isOperationLegal(ISD::STORE, VT))
     return SDValue();
 
@@ -6655,7 +6653,6 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) {
     return SDValue();
   unsigned ByteWidth = VT.getSizeInBits() / 8;
 
-  const TargetLowering &TLI = DAG.getTargetLoweringInfo();
   // Before legalize we can introduce too wide illegal loads which will be later
   // split into legal sized loads. This enables us to combine i64 load by i8
   // patterns to a couple of i32 loads on 32 bit targets.