[llvm] Correctly set pointer bit for aggregate values in SelectionDAGBuilder to fix CCIfPtr (PR #70554)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 01:25:34 PDT 2023


================
@@ -75,20 +75,23 @@ void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty,
                      SmallVectorImpl<uint64_t> *FixedOffsets,
                      uint64_t StartingOffset);
 
-/// Variant of ComputeValueVTs that also produces the memory VTs.
+/// Variant of ComputeValueVTs that also produces the memory VTs and VT types.
----------------
arsenm wrote:

I don't particularly like using a new output for the Types. The Types should be redundant with EVT (which sometimes do contain a Type* reference). The current hack unnaturally separates the pointer information in the ArgFlags. I believe you can always infer the pointer type from the underlying IR argument at the use point, although that will be really annoying for nested structs.

Long term we should have one of these that returns LLTs instead of EVT, that will preserve the pointer information.

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


More information about the llvm-commits mailing list