This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/79981] Forwprop not working for __atomic_compare_exchange_n
- From: "vogt at linux dot vnet.ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Mar 2017 10:48:20 +0000
- Subject: [Bug tree-optimization/79981] Forwprop not working for __atomic_compare_exchange_n
- Auto-submitted: auto-generated
- References: <bug-79981-4@http.gcc.gnu.org/bugzilla/>
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.