Skip to content

Commit a699436

Browse files
committed
fix libm not compiling
1 parent cfefdce commit a699436

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,6 +1670,8 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
16701670
simple_op! {
16711671
add,
16721672
int: i_add,
1673+
// TODO why does libm fail to compile if `add` doesn't support float? Why is it not using `fadd`?
1674+
float: f_add,
16731675
fold_const {
16741676
int(a, b) => a.wrapping_add(b);
16751677
}
@@ -1681,6 +1683,8 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
16811683
simple_op! {
16821684
sub,
16831685
int: i_sub,
1686+
// TODO why does libm fail to compile if `add` doesn't support float? Why is it not using `fadd`?
1687+
float: f_sub,
16841688
fold_const {
16851689
int(a, b) => a.wrapping_sub(b);
16861690
}

0 commit comments

Comments
 (0)