[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 31 13:01:06 PDT 2025
================
@@ -1138,8 +1138,9 @@ mlir::Value ScalarExprEmitter::emitShl(const BinOpInfo &ops) {
mlir::isa<cir::IntType>(ops.lhs.getType()))
cgf.cgm.errorNYI("sanitizers");
- cgf.cgm.errorNYI("shift ops");
- return {};
+ return builder.create<cir::ShiftOp>(cgf.getLoc(ops.loc),
----------------
andykaylor wrote:
Is there a reason this doesn't get a `createShift` call in `CIRBaseBuilderTy`? In particular, the `cgf.getBuilder().getUnitAttr()` argument (or lack thereof) is not very clear. A call to something like `createShiftLeft` or `createShiftRight` would be better.
https://github.com/llvm/llvm-project/pull/133405
More information about the cfe-commits
mailing list