[llvm] [X86][SimplifyCFG][CodeGen] Support hoisting load/store with conditional faulting (PR #95515)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 07:57:06 PDT 2024


================
@@ -4958,12 +4967,23 @@ void SelectionDAGBuilder::visitMaskedLoad(const CallInst &I, bool IsExpanding) {
       MachinePointerInfo(PtrOperand), MMOFlags,
       LocationSize::beforeOrAfterPointer(), Alignment, AAInfo, Ranges);
 
-  SDValue Load =
-      DAG.getMaskedLoad(VT, sdl, InChain, Ptr, Offset, Mask, Src0, VT, MMO,
-                        ISD::UNINDEXED, ISD::NON_EXTLOAD, IsExpanding);
+  const auto &TLI = DAG.getTargetLoweringInfo();
+  const auto &TTI =
+      TLI.getTargetMachine().getTargetTransformInfo(*I.getFunction());
+  // The Load/Res may point to different values.
----------------
KanRobert wrote:

Not sure it's doable. But It's strange, using two different `SDValue` is more intuitive.

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


More information about the llvm-commits mailing list