jrtc27 wrote: > I'm mostly concerned about the case where the lowered node has the wrong > type. For example, AArch64TargetLowering::LowerINTRINSIC_WO_CHAIN always > creates a value with the pointer width of addrspace 0, but address spaces > exist which don't have the native pointer width (arm64_32 exists, __ptr32 > exists). And I suspect that inconsistency causes a crash. Even if it doesn't > actually end up crashing in some cases, I'd prefer an explicit check to be on > the safe side.
I've opted for a verifier check as it gives earlier failure, and by the time you get to SDAG you've lost the address space so would only be able to check the resulting VT is expected. It also avoids having to touch every backend. Of course, someone may in future have some target that wants a different AS for this, but I'll leave that to them to figure out how best to support their use case. For the CHERI use case it'll always match the globals AS, and that's all Clang is using in this PR. https://github.com/llvm/llvm-project/pull/132489 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits