[all-commits] [llvm/llvm-project] fb2d67: [CIR] Support zero-result ops in clangir TableGen ...
Jiahao Guo via All-commits
all-commits at lists.llvm.org
Tue Jun 9 18:40:04 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fb2d6709f289525497cdf731bf32085401c6b962
https://github.com/llvm/llvm-project/commit/fb2d6709f289525497cdf731bf32085401c6b962
Author: Jiahao Guo <eoonguo at gmail.com>
Date: 2026-06-10 (Wed, 10 Jun 2026)
Changed paths:
M clang/include/clang/CIR/Dialect/IR/CIROps.td
M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
M clang/utils/TableGen/CIRLoweringEmitter.cpp
Log Message:
-----------
[CIR] Support zero-result ops in clangir TableGen lowering (#202273)
### summary
This is follow-up to https://github.com/llvm/llvm-project/pull/199599
A CIR op can set the llvmOp field to have cir-tblgen auto-generate its
CIR→LLVM lowering instead of using a hand-written pattern.However, the
generated body forwards the result type via op.getType(), which only
compiles for single-result ops. As a result, ops with zero results could
not use this feature.
To fix this, teach CIRLoweringEmitter to emit an empty mlir::TypeRange{}
for zero-result ops. Then switch cir.lifetime.start and cir.lifetime.end
to use llvmOp (dropping their hand-written lowering). The lifetime.cir
test covers the generated path.
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