[clang] [CIR][AArch64] Added vector intrinsics for shift left (PR #187516)
Andrzej WarzyĆski via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 23 08:01:45 PDT 2026
================
@@ -831,6 +831,40 @@ static cir::VectorType getNeonType(CIRGenFunction *cgf, NeonTypeFlags typeFlags,
llvm_unreachable("Unknown vector element type!");
}
+/// Get integer from a mlir::Value that is an int constant or a constant op.
+static int64_t getIntValueFromConstOp(mlir::Value val) {
+ return val.getDefiningOp<cir::ConstantOp>().getIntValue().getSExtValue();
+}
+
+/// Build a constant shift amount vector of `vecTy` to shift a vector
+/// Here `shitfVal` is a constant integer that will be splated into a
+/// a const vector of `vecTy` which is the return of this function
+static mlir::Value emitNeonShiftVector(CIRGenBuilderTy &builder,
----------------
banach-space wrote:
As discussed in https://github.com/llvm/llvm-project/pull/186693, let's use `cir.vec.splat` instead, see: https://github.com/llvm/llvm-project/pull/186693/changes#diff-6f7700013aa60ed524eb6ddcbab90c4dd288c384f9434547b038357868334932R850
https://github.com/llvm/llvm-project/pull/187516
More information about the cfe-commits
mailing list