LLVM insertvalue bad optimized?

前端 未结 1 1581
北恋
北恋 2021-01-19 07:41

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

相关标签:
1条回答
  • 2021-01-19 08:24

    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!

    0 讨论(0)
提交回复
热议问题