On Sat, Dec 20, 2014 at 10:18 AM, Segher Boessenkool <seg...@kernel.crashing.org> wrote: > If rs6000_split_logical is asked to invert the second operand (but not > the first), it emits RTL that is just that; but canonical RTL has the > first arm inverted if only one, not the second. This patch fixes that. > > With that in place, the bug in PR target/64358 is easily fixed. Do > that. Also change the other 128-bit boolc splitter to have the same > operand order as everything else. And use BOOL_REGS_OP1 and _OP2 for > operands 1 resp. 2 (not the other way around); this doesn't actually > matter, but it was a bit confusing. > > This fixes builtin-arith-overflow-{10,11}.c as well. > > Bootstrapped (no fortran this time, it doesn't build right now) and > tested on powerpc64-linux, -m32,-m32/-mpowerpc64,-m64,-m64/-mlra; no > regressions (and the mentioned cases fixed). > > Okay for mainline? Does this need backporting as well? > > > Segher > > > 2014-12-20 Segher Boessenkool <seg...@kernel.crashing.org> > > gcc/ > PR target/64358 > * config/rs6000/rs6000.c (rs6000_split_logical_inner): Swap the > input operands if only the second is inverted. > * config/rs6000/rs6000.md (*boolc<mode>3_internal1 for BOOL_128): > Swap BOOL_REGS_OP1 and BOOL_REGS_OP2. Correct arguments to > rs6000_split_logical. > (*boolc<mode>3_internal2 for TI2): Swap operands[1] and operands[2].
Okay. Thanks, David