[PATCH] D87140: [GlobalISel] Avoid making G_PTR_ADD with nullptr
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 02:27:46 PDT 2020
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2774
+
+ LLT ElemTy = Ty.isVector() ? Ty.getElementType() : Ty;
+ if (DL.isNonIntegralAddressSpace(ElemTy.getAddressSpace()))
----------------
This is just Ty.getScalarType().
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2783
+
+ if (Ty.isVector()) {
+ const MachineInstr *VecMI = MRI.getVRegDef(MI.getOperand(1).getReg());
----------------
You should be able to assert that it is a vector here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87140/new/
https://reviews.llvm.org/D87140
More information about the llvm-commits
mailing list