Reproducer: //func.cpp extern bool var_22; void test(long long a, unsigned b, unsigned long long c) { for (long i = 0; i < 16; i += 1ULL) if (a) var_22 = 5023804122334ULL >= (char)c; } //driver.cpp #include <stdio.h> long long int a = -2161098602020439353LL; unsigned int b = 1621447385U; unsigned long long int c = 16505450185101189749ULL; bool var_22 = (bool)0; void test(long long int a, unsigned int b, unsigned long long int c); int main() { test(a, b, c); printf("%d\n", (int)var_22); } Error: >$ g++ -O3 -march=skylake-avx512 func.cpp driver.cpp && sde -skx -- ./a.out 0 >$ g++ -O0 func.cpp driver.cpp && sde -skx -- ./a.out 1 gcc version 11.0.0 20201217 (6f8486523f61bf0aa476dfa4197d1e3b71a0a8f3) (GCC)
It is caused by r11-3072.
Mine.
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>: https://gcc.gnu.org/g:01da03c915f086fb9aa36b809c1a06a9f661533b commit r11-6468-g01da03c915f086fb9aa36b809c1a06a9f661533b Author: Richard Biener <rguenther@suse.de> Date: Tue Jan 5 14:23:55 2021 +0100 tree-optimization/98381 - fix live bool vector extract This fixes extraction of live bool vector results for the case of integer mode vectors. 2021-01-05 Richard Biener <rguenther@suse.de> PR tree-optimization/98381 * tree.c (vector_element_bits): Properly compute bool vector element size. * tree-vect-loop.c (vectorizable_live_operation): Properly compute the last lane bit offset.
Fixed.