Skip to content

Commit 2ab84b4

Browse files
committed
address comments
1 parent c6b5f73 commit 2ab84b4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

llvm/lib/IR/AutoUpgrade.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,9 +1356,12 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
13561356
else if (Name.consume_front("atomic.load."))
13571357
// nvvm.atomic.load.add.{f32,f64}.p
13581358
// nvvm.atomic.load.{inc,dec}.32.p
1359-
Expand = Name.starts_with("add.f32.p") ||
1360-
Name.starts_with("add.f64.p") ||
1361-
Name.starts_with("inc.32.p") || Name.starts_with("dec.32.p");
1359+
Expand = StringSwitch<bool>(Name)
1360+
.StartsWith("add.f32.p", true)
1361+
.StartsWith("add.f64.p", true)
1362+
.StartsWith("inc.32.p", true)
1363+
.StartsWith("dec.32.p", true)
1364+
.Default(false);
13621365
else if (Name.consume_front("bitcast."))
13631366
// nvvm.bitcast.{f2i,i2f,ll2d,d2ll}
13641367
Expand =

0 commit comments

Comments
 (0)