[PATCH] D118309: AMDGPU/GlobalISel: Fix assertions on invalid addrspacecasts

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 01:57:51 PST 2022


sebastian-ne added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1945
 
-  auto SegmentNull = B.buildConstant(SrcTy, TM.getNullPointerValue(SrcAS));
-  auto FlatNull = B.buildConstant(DstTy, TM.getNullPointerValue(DestAS));
+  if (SrcAS == AMDGPUAS::CONSTANT_ADDRESS_32BIT) {
+    const SIMachineFunctionInfo *Info = MF.getInfo<SIMachineFunctionInfo>();
----------------
Should this check that the DestTy is 64 bit like in the SDag?
Otherwise addrspace(6) to addrspace(3) cast seems to be accepted.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118309/new/

https://reviews.llvm.org/D118309



More information about the llvm-commits mailing list