Skip to content

Commit 29ac612

Browse files
committed
Address review comments and update test RUNOption
1 parent af32767 commit 29ac612

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,11 +2198,11 @@ mlir::Value buildNeonCall(unsigned int builtinID, CIRGenFunction &cgf,
21982198
}
21992199

22002200
/// Get integer from a mlir::Value that is an int constant or a constant op.
2201-
static int getIntFromMLIRValue(mlir::Value val) {
2201+
static int64_t getIntValueFromConstOp(mlir::Value val) {
22022202
auto constOp = mlir::cast<mlir::cir::ConstantOp>(val.getDefiningOp());
2203-
return (int)((mlir::cast<mlir::cir::IntAttr>(constOp.getValue()))
2204-
.getValue()
2205-
.getSExtValue());
2203+
return (mlir::cast<mlir::cir::IntAttr>(constOp.getValue()))
2204+
.getValue()
2205+
.getSExtValue();
22062206
}
22072207

22082208
mlir::Value CIRGenFunction::buildCommonNeonBuiltinExpr(
@@ -2251,7 +2251,7 @@ mlir::Value CIRGenFunction::buildCommonNeonBuiltinExpr(
22512251
}
22522252
case NEON::BI__builtin_neon_vext_v:
22532253
case NEON::BI__builtin_neon_vextq_v: {
2254-
int cv = getIntFromMLIRValue(ops[2]);
2254+
int cv = getIntValueFromConstOp(ops[2]);
22552255
llvm::SmallVector<int64_t, 16> indices;
22562256
for (unsigned i = 0, e = vTy.getSize(); i != e; ++i)
22572257
indices.push_back(i + cv);

clang/test/CIR/CodeGen/AArch64/neon-ext-mov.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -target-feature +neon \
2-
// RUN: -fclangir -disable-O0-optnone \
2+
// RUN: -fclangir -disable-O0-optnone -fno-clangir-call-conv-lowering \
33
// RUN: -flax-vector-conversions=none -emit-cir -o %t.cir %s
44
// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
55

66
// RUN: %clang_cc1 -triple aarch64-none-linux-android24 -target-feature +neon \
7-
// RUN: -fclangir -disable-O0-optnone \
7+
// RUN: -fclangir -disable-O0-optnone -fno-clangir-call-conv-lowering \
88
// RUN: -flax-vector-conversions=none -emit-llvm -o - %s \
99
// RUN: | opt -S -passes=instcombine,mem2reg,simplifycfg -o %t.ll
1010
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s

0 commit comments

Comments
 (0)