Skip to content

Commit c21ee8b

Browse files
committed
Modified: Removed redundant comments and asserts.
1 parent 2c16af6 commit c21ee8b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

llvm/tools/llvm-exegesis/lib/AArch64/Target.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static unsigned getLoadImmediateOpcode(unsigned RegBitWidth) {
2828
// Generates instruction to load an immediate value into a register.
2929
static MCInst loadImmediate(MCRegister Reg, unsigned RegBitWidth,
3030
const APInt &Value) {
31-
// 0 <= Value.getZExtValue() < 2**16
3231
assert(Value.getZExtValue() < (1 << 16) &&
3332
"Value must be in the range of the immediate opcode");
3433
return MCInstBuilder(getLoadImmediateOpcode(RegBitWidth))
@@ -38,7 +37,6 @@ static MCInst loadImmediate(MCRegister Reg, unsigned RegBitWidth,
3837

3938
static MCInst loadZPRImmediate(MCRegister Reg, unsigned RegBitWidth,
4039
const APInt &Value) {
41-
// -127 <= Value.getZExtValue() < 128
4240
assert(Value.getZExtValue() < (1 << 7) &&
4341
"Value must be in the range of the immediate opcode");
4442
return MCInstBuilder(AArch64::DUP_ZI_D)
@@ -69,12 +67,8 @@ static unsigned getLoadFPImmediateOpcode(unsigned RegBitWidth) {
6967
// Generates instruction to load an FP immediate value into a register.
7068
static MCInst loadFPImmediate(MCRegister Reg, unsigned RegBitWidth,
7169
const APInt &Value) {
72-
// 0 <= Value.getZExtValue() < 2**8 (int Value)
73-
// -31.0 <= Value.getZExtValue() < 31.0 (frac Value)
7470
assert(Value.getZExtValue() == 0 &&
75-
"Value should be zero, temporary fix for now");
76-
assert(Value.getZExtValue() < (1 << 8) &&
77-
"Value must be in the range of the immediate opcode");
71+
"Expected initialisation value 0");
7872
return MCInstBuilder(getLoadFPImmediateOpcode(RegBitWidth))
7973
.addReg(Reg)
8074
.addImm(Value.getZExtValue());

0 commit comments

Comments
 (0)