Codegen of array initialization generates weird LLVM-IR #1266
Labels
good first issue
Good for newcomers
IR difference
A difference in ClangIR-generated LLVM IR that could complicate reusing original CodeGen tests
When generating LLVM-IR through CIR for the following code:
We get the following LLVM-IR:
Notices the triple GEP(GEP(GEP(arr,1),1),1) for the last store. Clang generates a sane
GEP(arr,3)
for that in codegen.The root cause is in the way the codegen is written in
CIRGenExprAgg.cpp
inAggExprEmitter::emitArrayInit
.Would be nice to get to parity here :)
The text was updated successfully, but these errors were encountered: