aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-18 16:05:30 +0000
committergingerBill <bill@gingerbill.org>2023-01-18 16:05:30 +0000
commiteb1d00ced6e27453b52f4420766cca8886898d01 (patch)
tree5b38ee732503e0b6856000bfc47bd6f7218a2c80 /src/llvm_backend_expr.cpp
parentf41c91d36b4824606d7b4fe91607c3802fc55446 (diff)
Fix #2264
Diffstat (limited to 'src/llvm_backend_expr.cpp')
-rw-r--r--src/llvm_backend_expr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp
index b1b1ad52a..1eb8a181e 100644
--- a/src/llvm_backend_expr.cpp
+++ b/src/llvm_backend_expr.cpp
@@ -1168,6 +1168,9 @@ gb_internal lbValue lb_emit_arith(lbProcedure *p, TokenKind op, lbValue lhs, lbV
}
}
+ lhs = lb_emit_conv(p, lhs, type);
+ rhs = lb_emit_conv(p, rhs, type);
+
if (is_type_integer(type) && is_type_different_to_arch_endianness(type)) {
switch (op) {
case Token_AndNot:
@@ -1196,10 +1199,7 @@ gb_internal lbValue lb_emit_arith(lbProcedure *p, TokenKind op, lbValue lhs, lbV
return lb_emit_byte_swap(p, res, type);
}
-handle_op:
- lhs = lb_emit_conv(p, lhs, type);
- rhs = lb_emit_conv(p, rhs, type);
-
+handle_op:;
lbValue res = {};
res.type = type;