nlopes added a comment.

In D143287#4202174 <https://reviews.llvm.org/D143287#4202174>, @ManuelJBrito 
wrote:

> Implementing the 128 to 512 casts by filling the rest of the vector with the 
> same definition of a nondeterministic_value is not correct because  :
>
> a = freeze poison
> v = <a, a>
>
> is not the same as
>
> v = freeze poison
>
> The only solution I'm seeing ,using the shufflevector, is doing the 
> conversion in two steps:
>
> - build a 256 vector with the upper half being undefined( freeze poison)
> - build a 512 vector where the lower half is the previous 256 vector and the 
> upper half being undefined
>
> I think this would require two shuffles which is unfortunate.
>
> This would ensure no miscompilations due to multiple uses of the same freeze 
> undef/poison but would probably require some backend work to ensure the 
> pattern is recognized to emit efficient assembly.

Semantically that is correct.
But the backend may require some tweaks to recognize this pattern.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143287

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

Reply via email to