================
@@ -272,8 +284,10 @@ class LLVM_LIBRARY_VISIBILITY SPIR32TargetInfo : public
SPIRTargetInfo {
assert(Triple.getArch() == llvm::Triple::spir &&
"Invalid architecture for 32-bit SPIR.");
PointerWidth = PointerAlign = 32;
- SizeType = TargetInfo::UnsignedInt;
- PtrDiffType = IntPtrType = TargetInfo::SignedInt;
+ if (!HostTarget || HostTarget->getPointerWidth(LangAS::Default) != 32) {
+ SizeType = TargetInfo::UnsignedInt;
+ PtrDiffType = IntPtrType = TargetInfo::SignedInt;
+ }
----------------
tahonermann wrote:
I would prefer that the offending RUN lines be removed. A follow up PR will be
needed to reject inappropriate host/device combinations with an appropriate
diagnostic regardless, but I would prefer to get these changes correct now. See
https://github.com/intel/llvm/issues/18304 for a related issue filed against
the intel/llvm repo.
https://github.com/llvm/llvm-project/pull/208196
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits