Skip to content

Commit 9ddd853

Browse files
committed
Fix: use makeConst instead of makeFromInt32
1 parent effd7ac commit 9ddd853

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/passes/OptimizeInstructions.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -2930,10 +2930,8 @@ struct OptimizeInstructions
29302930
Properties::getFallthrough(block, getPassOptions(), *getModule());
29312931
if (auto* c = fallthrough->dynCast<Const>()) {
29322932
Builder builder(*getModule());
2933-
return getDroppedChildrenAndAppend(
2934-
binary,
2935-
LiteralUtils::makeFromInt32(
2936-
c->value.geti32(), Type::i32, *getModule()));
2933+
return getDroppedChildrenAndAppend(binary,
2934+
builder.makeConst(c->value));
29372935
}
29382936
}
29392937
if (auto* ext = Properties::getSignExtValue(binary)) {

0 commit comments

Comments
 (0)