LLVM insertvalue bad optimized?
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 following example: ; ModuleID = 'mod' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-pc-linux-gnu" %A = type { i64, i64, i64, i64, i64, i64, i64, i64 } @aa = external global %A* define void @func() { entry: %a1 = load %A** @aa %a2 = load %A* %a1 %a3 = insertvalue %A %a2, i64 3, 3 store %A