-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
hangCompiler hang (infinite loop)Compiler hang (infinite loop)llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passes
Description
We have several internal tests that usually take only a few seconds to compile, but after e158add, the tests are now taking minutes to compile before the automation kills the compilation. I manually tried to compile one of the tests, and before the above change, the compile only took a few seconds, but after, it was running for 8 minutes without ending before I killed it.
I was able to reduce one of the tests down to the following code:
typedef signed char schar;
typedef char __attribute__((ext_vector_type(8))) char8;
typedef schar __attribute__((ext_vector_type(8))) schar8;
typedef union { char8 a; schar8 b; } union_char8_schar8;
typedef union { schar8 a; char8 b; } union_schar8_char8;
#define union_char8_schar8_a(__A) ((__A.a))
#define char8_bxor(__A, __B) ((char8)(__A ^ __B))
#define union_schar8_char8_a(__A) ((__A.a))
#define convertvector_schar8_char8(__A) (__builtin_convertvector(__A, char8))
#define char8_neq(__A, __B) ((char8)(__A != __B))
char8 test48()
{
char8 id10189 = (char8){(char)1018307070, (char)2147483647, (char)982280499, (char)-241742324, (char)-2103038824, (char)1483383219, (char)-2147483647, (char)-26378412}; // vec_type
union_char8_schar8 id10191;
id10191.a = (char8){(char)2147483647, (char)1478343380, (char)-1460710262, (char)-493315656, (char)-1241235597, (char)1533947050, (char)-210503871, (char)-110138540}; // vec_type
volatile char8 id10190 = union_char8_schar8_a(id10191);
char8 id10188 = char8_bxor(id10189, id10190);
union_schar8_char8 id10194;
id10194.b = (char8){(char)-1721966071, (char)1207924559, (char)-1065372584, (char)-331857933, (char)592155444, (char)-547728733, (char)1148365877, (char)1439159937}; // vec_type
schar8 id10193 = union_schar8_char8_a(id10194);
char8 id10192 = convertvector_schar8_char8(id10193);
char8 id10187 = char8_neq(id10188, id10192);
return id10187;
}If compiled with optimizations enabled -O2 the compiler seems to get stuck in an infinite loop.
@dtcxzyw this seems to have been caused by a change you made. Can you take a look and revert if you need time to investigate?
Metadata
Metadata
Assignees
Labels
hangCompiler hang (infinite loop)Compiler hang (infinite loop)llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passes