[llvm] arm64_32: extend @llvm.stackguard call to in-DAG 64-bits before handing off (PR #77318)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 22:46:06 PST 2024


================
@@ -6928,11 +6928,13 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
   case Intrinsic::stackguard: {
     MachineFunction &MF = DAG.getMachineFunction();
     const Module &M = *MF.getFunction().getParent();
+    EVT PtrTy = TLI.getValueType(DAG.getDataLayout(), I.getType());
     SDValue Chain = getRoot();
     if (TLI.useLoadStackGuardNode()) {
       Res = getLoadStackGuard(DAG, sdl, Chain);
+      if (Res.getValueType() != PtrTy)
----------------
arsenm wrote:

You can drop the comparison, the get*ExtOrTrunc functions all check internally 

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


More information about the llvm-commits mailing list