Issue 95216
Summary Converting float16 -> float32 in computations seem to behave inconsistently
Labels
Assignees
Reporter DenisYaroshevskiy
    Hi!

In the following example tst1 and tst2 produce different assembly, specifically tst2 does `__truncsfhf2` on every add.


```
_Float16 tst1(_Float16 a, _Float16 b, _Float16 c) {
  return a + b + c;
}

_Float16 tst2(_Float16 a, _Float16 b, _Float16 c) {
 _Float16 res = 0;

  res *= a;
  res *= b;
  res *= c;

 return res;
}
```

https://godbolt.org/z/WKh8v1EaE

Is this an expected/desired behaviour? If so - what is the rule governing _Float16 emulation.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to