aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.cc
diff options
context:
space:
mode:
authorliuhongt <hongtao.liu@intel.com>2022-05-31 17:13:21 +0800
committerliuhongt <hongtao.liu@intel.com>2022-06-16 09:26:36 +0800
commit1089d083117f28f3518f5ec3c7a153236cb92334 (patch)
treeef3527ef21d4ba082be241674924b1ce96d6ead6 /gcc/builtins.cc
parent499b9c5f099c1b3e1ec14977abafe62a4c712bdd (diff)
downloadgcc-1089d083117f28f3518f5ec3c7a153236cb92334.zip
gcc-1089d083117f28f3518f5ec3c7a153236cb92334.tar.gz
gcc-1089d083117f28f3518f5ec3c7a153236cb92334.tar.bz2
Simplify (B * v + C) * D -> BD* v + CD when B,C,D are all INTEGER_CST.
Similar for (v + B) * C + D -> C * v + BCD. Don't simplify it when there's overflow and overflow is UB for type v. gcc/ChangeLog: PR tree-optimization/53533 * match.pd: Simplify (B * v + C) * D -> BD * v + CD and (v + B) * C + D -> C * v + BCD when B,C,D are all INTEGER_CST, and there's no overflow or !TYPE_OVERFLOW_UNDEFINED. gcc/testsuite/ChangeLog: * gcc.target/i386/pr53533-1.c: New test. * gcc.target/i386/pr53533-2.c: New test. * gcc.target/i386/pr53533-3.c: New test. * gcc.target/i386/pr53533-4.c: New test. * gcc.target/i386/pr53533-5.c: New test. * gcc.dg/vect/slp-11a.c: Adjust testcase.
Diffstat (limited to 'gcc/builtins.cc')
0 files changed, 0 insertions, 0 deletions