tree-optimization/105802 - another unswitching type issue
authorRichard Biener <rguenther@suse.de>
Wed, 1 Jun 2022 13:42:06 +0000 (15:42 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 2 Jun 2022 06:35:23 +0000 (08:35 +0200)
commit4a6b8d9aad9f68eec223cc126d9effbf45e37271
tree9facd460dc0d8d3ad5ad0ac3918844ccb2a5866b
parent3164de6ac1b8473e60f6b85e94b15930694c80d7
tree-optimization/105802 - another unswitching type issue

This also fixes the type of the irange used for unswitching of
switch statements.

PR tree-optimization/105802
* tree-ssa-loop-unswitch.cc (find_unswitching_predicates_for_bb):
Make sure to also compute the range in the type of the switch index.

* g++.dg/opt/pr105802.C: New testcase.
gcc/testsuite/g++.dg/opt/pr105802.C [new file with mode: 0644]
gcc/tree-ssa-loop-unswitch.cc