rjmccall added a comment.

In D113107#3606107 <https://reviews.llvm.org/D113107#3606107>, @zahiraam wrote:

> For this test case:
> _Float16 add_half_cr(_Float16 a, _Float16 b) {
>
>   return a > b ? a : b;
>
> }
>
> are we expecting the phi node to be
>
> cond.true:
>
>   %2 = load float , ptr 
>   ...
>
> cond.false:
>
>   %3 = load float, ptr
>   ...
>
> %cond = phi float {{.*}} {{.*}}
>
> ?

I would say no, but if you add a promotable operation outside the `? :`, like 
`(a > b ? a : b) + 1`, then we should emit the ternary as a promoted value, and 
that should force its operands to be emitted under promotion.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113107/new/

https://reviews.llvm.org/D113107

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to