tree-optimization/110506 - bogus non-zero mask in CCP for vector types
commitbd7e9856fe5bbeb487797476c4fffb660f63cf4f
authorRichard Biener <rguenther@suse.de>
Mon, 3 Jul 2023 06:28:17 +0000 (3 08:28 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 3 Jul 2023 08:02:25 +0000 (3 10:02 +0200)
treee6a722b0f7820e0cf70ceafe505a43aca3afce55
parent8cb087d869be698a86b082a7248d03e468ef1eb1
tree-optimization/110506 - bogus non-zero mask in CCP for vector types

get_value_for_expr was blindlessly using TYPE_PRECISION to produce
a mask for vector typed entities which the new tree checking now
catches.

PR tree-optimization/110506
* tree-ssa-ccp.cc (get_value_for_expr): Check for integral
type before relying on TYPE_PRECISION to produce a nonzero mask.

* gcc.dg/pr110506.c: New testcase.
gcc/testsuite/gcc.dg/pr110506.c [new file with mode: 0644]
gcc/tree-ssa-ccp.cc