[all-commits] [llvm/llvm-project] 43511b: [CIR] Add Extend (signext/zeroext) handling to Cal...
adams381 via All-commits
all-commits at lists.llvm.org
Fri May 29 11:47:17 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 43511b564751fa0231d012b8bda59b88915d5855
https://github.com/llvm/llvm-project/commit/43511b564751fa0231d012b8bda59b88915d5855
Author: adams381 <adams at nvidia.com>
Date: 2026-05-29 (Fri, 29 May 2026)
Changed paths:
M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
A clang/test/CIR/Transforms/abi-lowering/extend-after-ignore.cir
A clang/test/CIR/Transforms/abi-lowering/extend-return.cir
A clang/test/CIR/Transforms/abi-lowering/extend-signed-arg.cir
A clang/test/CIR/Transforms/abi-lowering/extend-unsigned-arg.cir
Log Message:
-----------
[CIR] Add Extend (signext/zeroext) handling to CallConvLowering (#195745)
Third PR in the series splitting
[#192119](https://github.com/llvm/llvm-project/pull/192119) /
[#192124](https://github.com/llvm/llvm-project/pull/192124).
[#195725](https://github.com/llvm/llvm-project/pull/195725) and
[#195737](https://github.com/llvm/llvm-project/pull/195737) have merged;
this PR is now a standalone diff on main.
Adds Extend (signext / zeroext) to `cir-call-conv-lowering`. The CIR
signature keeps the original narrow integer type; the rewriter attaches
`llvm.signext` / `llvm.zeroext` to `arg_attrs` and `res_attrs`. That
matches classic Clang's LLVM IR convention — `define void @f(i8 signext
%x)`, not `define void @f(i32 signext %x)` with an entry-block
truncation. The `coercedType` field on an Extend `ArgClassification` is
informational only; the rewriter doesn't use it to change the CIR
signature.
Three `.cir` tests cover narrow-signed-arg, narrow-unsigned-arg, and
narrow-signed-return. Since the test target's narrow-int Extend rule
fires only on MLIR `IntegerType` and CIR functions use `cir::IntType`,
these tests drive the rewriter through the classification-injection path
added in [#195725](https://github.com/llvm/llvm-project/pull/195725).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list