[RISCV] Correct the output chain in lowerFixedLengthVectorMaskedLoadToRVV
authorCraig Topper <craig.topper@sifive.com>
Thu, 18 Mar 2021 23:22:19 +0000 (16:22 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 18 Mar 2021 23:34:35 +0000 (16:34 -0700)
We returned the input chain instead of the output chain from the
new load. This bypasses the load in the chain. I haven't found a
good way to test this yet. IR order prevents my initial attempts
at causing reordering.

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

index bea946d..8c08542 100644 (file)
@@ -3217,7 +3217,7 @@ SDValue RISCVTargetLowering::lowerFixedLengthVectorMaskedLoadToRVV(
                               Load->getMemoryVT(), Load->getMemOperand());
 
   SDValue Result = convertFromScalableVector(VT, NewLoad, DAG, Subtarget);
-  return DAG.getMergeValues({Result, Load->getChain()}, DL);
+  return DAG.getMergeValues({Result, NewLoad.getValue(1)}, DL);
 }
 
 SDValue RISCVTargetLowering::lowerFixedLengthVectorMaskedStoreToRVV(