[Mlir-commits] [mlir] [mlir][emitc] Add EmitC index types (PR #93155)
Corentin Ferry
llvmlistbot at llvm.org
Wed May 29 04:13:12 PDT 2024
================
@@ -56,9 +56,9 @@ std::optional<Type> mlir::emitc::getSignedTypeFor(Type ty) {
if (ty.isInteger())
return IntegerType::get(ty.getContext(), ty.getIntOrFloatBitWidth(),
IntegerType::SignednessSemantics::Signed);
- if (isa<emitc::SizeTType>(ty))
- return emitc::PtrDiffTType::get(ty.getContext());
- if (isSupportedIntegerType(ty))
+ if (isa<SizeTType, SignedSizeTType>(ty))
----------------
cferry-AMD wrote:
It's signed, but it does not (per spec, though in practice it does) allow arithmetic ops on negative values.
https://github.com/llvm/llvm-project/pull/93155
More information about the Mlir-commits
mailing list