Closed
Description
Example IR:
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2"
target triple = "x86_64-unknown-linux-gnu"
define i32 @foo(i32 %arg1) #0 {
entry:
%a = extractelement <32 x i8> zeroinitializer, i32 %arg1
%b = zext i8 %a to i32
ret i32 %b
}
attributes #0 = { "no-realign-stack" "target-cpu"="skylake-avx512" }
And here is the corresponding Assembly :
foo: # @foo
vxorps %xmm0, %xmm0, %xmm0
vmovaps %ymm0, -40(%rsp)
andl $31, %edi
movzbl -40(%rsp,%rdi), %eax
vzeroupper
retq
with the stack slot generated:
Frame Objects:
fi#0: size=32, align=16, at location [SP+8]
Here is the link to the same example on godbolt: Link
The vmovaps
instruction can generate a fault for this example.