Should I avoid using the \'insertvalue\' instruction combined with load and store when I emit LLVM code? I always get bad optimized native code when I use it. Look at the fo
First, note that llc does not do any IR-level optimizations. So, you should run opt to run the set of IR-level optimizers.
However, opt does not help in this. I'd expect that standard IR-level optimizers canonicalize the stuff into gep somehow.
Please file a LLVM PR, this looks like a missed optimization!