-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Open
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.loopoptimmissed-optimization
Description
The Code like this
int x[128000];
void in(int k, int n) {
for(unsigned long long i=0; i<128000; i++)
x[i] = k;
}
If we build it for a 32bit system such as
./bin/clang --target=riscv32-linux-gnu -O3 -S n.c -emit-llvm
the 64bit one will be used, while in fact we can transform it to 32bit one, as it is less than 128000 always.
In fact gcc does this transform.
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.loopoptimmissed-optimization