pedroclobo wrote:

Thanks for the heads-up! I've skimmed through the [Arm Architecture Reference 
Manual for A-profile 
architecture](https://developer.arm.com/documentation/ddi0487/latest/) but what 
I've found is rather inconclusive.
Section B1.4.5.3 states that "_Merging predication is performed when Inactive 
elements in the destination register retain their previous value._". The 
description of each of the changed builtins just mentions that merging 
predication should be performed. Merging with `poison` would only be 
problematic if a non-predicated instruction ends up processing the inactive 
elements in some way, potentially observing distinct values at each use. I'm 
not sure if this is frequent or even possible by reading the reference manual, 
but I would not be surprised if it is. 

My interpretation suggests that we should instead merge with a deterministic 
value (to be on the safe side), such as `freeze(poison)`, in order to _retain 
the previous value_ and prevent the problem I mentioned above. We could also 
use `zeroinitializer` but `freeze(poison)` seems to be more semantically 
aligned with what the manual specifies.

https://github.com/llvm/llvm-project/pull/124596
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to