https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78556
Bug ID: 78556 Summary: config/rs6000/rs6000.c:6217:36: runtime error: left shift of negative value -12301 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- Host: powerpc64le-unknown-linux-gnu Target: powerpc64le-unknown-linux-gnu Build: powerpc64le-unknown-linux-gnu On powerpc64le-unknown-linux-gnu during bootstrap-ubsan: config/rs6000/rs6000.c:6217:36: runtime error: left shift of negative value -12301 I will test: diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6c28e6a..1ec43c7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -6214,7 +6214,7 @@ vspltis_constant (rtx op, unsigned step, unsigned copies) bitsize /= 2; small_val = splat_val >> bitsize; mask >>= bitsize; - if (splat_val != ((small_val << bitsize) | (small_val & mask))) + if (splat_val != ((UINTVAL (small_val) << bitsize) | (small_val & mask))) return false; splat_val = small_val; }