tree-optimization/92645 - avoid harmful early BIT_FIELD_REF canonicalization
authorRichard Biener <rguenther@suse.de>
Wed, 13 Jan 2021 12:48:31 +0000 (13:48 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 13 Jan 2021 13:51:08 +0000 (14:51 +0100)
commit285fa338b06b804e72997c4d876ecf08a9c083af
tree97ed22c7c131348831676bde0bcb4d1dc9346891
parenta2d04f3d2c90155bea035d7527a49bc4a6a3397b
tree-optimization/92645 - avoid harmful early BIT_FIELD_REF canonicalization

This avoids canonicalizing BIT_FIELD_REF <T1> (a, <sz>, 0) to
(T1)a on integer typed a.  This confuses the vectorizer SLP matching.

With this delayed to after vector lowering the testcase in PR92645
from Skia is now finally optimized to reasonable assembly.

2021-01-13  Richard Biener  <rguenther@suse.de>

PR tree-optimization/92645
* match.pd (BIT_FIELD_REF to conversion): Delay canonicalization
until after vector lowering.

* gcc.target/i386/pr92645-7.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-54.c: Adjust.
* gcc.dg/pr69047.c: Likewise.
gcc/match.pd
gcc/testsuite/gcc.dg/pr69047.c
gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-54.c
gcc/testsuite/gcc.target/i386/pr92645-7.c [new file with mode: 0644]