Skip to content

Commit 5c9d249

Browse files
committed
simplify
1 parent 10d29be commit 5c9d249

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

ir/instr.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,9 +1489,7 @@ void FpConversionOp::print(ostream &os) const {
14891489
case FPExt: str = "fpext "; break;
14901490
case FPTrunc: str = "fptrunc "; break;
14911491
case LRInt: str = "lrint "; break;
1492-
case LLRInt: str = "llrint "; break;
14931492
case LRound: str = "lround "; break;
1494-
case LLRound: str = "llround "; break;
14951493
}
14961494

14971495
os << getName() << " = " << str << *val << print_type(getType(), " to ", "")
@@ -1517,21 +1515,17 @@ StateValue FpConversionOp::toSMT(State &s) const {
15171515
break;
15181516
case FPToSInt:
15191517
case LRInt:
1520-
case LLRInt:
15211518
case LRound:
1522-
case LLRound:
15231519
fn = [&](auto &val, auto &to_type, auto rm_) -> StateValue {
15241520
expr rm;
15251521
switch (op) {
15261522
case FPToSInt:
15271523
rm = expr::rtz();
15281524
break;
15291525
case LRInt:
1530-
case LLRInt:
15311526
rm = get_fp_rounding(s);
15321527
break;
15331528
case LRound:
1534-
case LLRound:
15351529
rm = expr::rna();
15361530
break;
15371531
default: UNREACHABLE();
@@ -1592,9 +1586,7 @@ expr FpConversionOp::getTypeConstraints(const Function &f) const {
15921586
case FPToSInt:
15931587
case FPToUInt:
15941588
case LRInt:
1595-
case LLRInt:
15961589
case LRound:
1597-
case LLRound:
15981590
c = getType().enforceIntOrVectorType() &&
15991591
val->getType().enforceFloatOrVectorType();
16001592
break;

ir/instr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class ConversionOp final : public Instr {
237237
class FpConversionOp final : public Instr {
238238
public:
239239
enum Op { SIntToFP, UIntToFP, FPToSInt, FPToUInt, FPExt, FPTrunc, LRInt,
240-
LLRInt, LRound, LLRound };
240+
LRound };
241241

242242
private:
243243
Value *val;

llvm_util/llvm2alive.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,13 +1027,13 @@ class llvm2alive_ : public llvm::InstVisitor<llvm2alive_, unique_ptr<Instr>> {
10271027
case llvm::Intrinsic::experimental_constrained_fpext: op = FpConversionOp::FPExt; break;
10281028
case llvm::Intrinsic::experimental_constrained_fptrunc: op = FpConversionOp::FPTrunc; break;
10291029
case llvm::Intrinsic::lrint:
1030-
case llvm::Intrinsic::experimental_constrained_lrint: op = FpConversionOp::LRInt; break;
1030+
case llvm::Intrinsic::experimental_constrained_lrint:
10311031
case llvm::Intrinsic::llrint:
1032-
case llvm::Intrinsic::experimental_constrained_llrint: op = FpConversionOp::LLRInt; break;
1032+
case llvm::Intrinsic::experimental_constrained_llrint: op = FpConversionOp::LRInt; break;
10331033
case llvm::Intrinsic::lround:
1034-
case llvm::Intrinsic::experimental_constrained_lround: op = FpConversionOp::LRound; break;
1034+
case llvm::Intrinsic::experimental_constrained_lround:
10351035
case llvm::Intrinsic::llround:
1036-
case llvm::Intrinsic::experimental_constrained_llround: op = FpConversionOp::LLRound; break;
1036+
case llvm::Intrinsic::experimental_constrained_llround: op = FpConversionOp::LRound; break;
10371037
default:
10381038
return error(i);
10391039
}

0 commit comments

Comments
 (0)