Bug https://llvm.org/bugs/show_bug.cgi?id=25270
Add AVX-512 not materializable instructions.
Otherwise value can be reused , despite its value could be changed - produces incorrect assembler.
example
define void @bar__512(<16 x i32>* %var) {
%var_load_load = load <16 x i32>, <16 x i32>* %var, align 1 store <16 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>, <16 x i32>* %var, align 64 call void @Print__512(<16 x i32> %var_load_load) call void @Print__512(<16 x i32> %var_load_load) store <16 x i32> <i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7, i32 7>, <16 x i32>* %var, align 64 ret void
}
Befor the fix
movq %rdi, %rbx
vmovdqu32 (%rbx), %zmm0
vpbroadcastd .LCPI0_0(%rip), %zmm1
vmovdqa32 %zmm1, (%rbx) -- change value
callq Print512
vmovdqu32 (%rbx), %zmm0 -- incorrect , value has been changed ,
callq Print512
After fix
movq %rdi, %rbx
vmovdqu32 (%rbx), %zmm0
vmovups %zmm0, (%rsp) # 64-byte Spill
vpbroadcastd .LCPI0_0(%rip), %zmm1
vmovdqa32 %zmm1, (%rbx)
callq Print512
vmovups (%rsp), %zmm0 # 64-byte Reload
callq Print512