This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/79981] Forwprop not working for __atomic_compare_exchange_n


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79981

--- Comment #5 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
The knowledge that the integer can only assume the values 0 and 1 seems to be
hard coded.  Is it possible to add value range information?  With that, all
conditions and arithmetics could be done with the integer, and the boolean
value would only be useful if the return value is explicitly stored in memory
or so.

Doing calculations with the boolean type (QImode) is something we really need
to avoid on s390x because it eventually results in widening the value to SImode
with bit arithmetics and clobbering the condition code as a side effect.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]