File tree 2 files changed +23
-0
lines changed 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -2483,6 +2483,11 @@ Align SelectionDAG::getReducedAlign(EVT VT, bool UseABI) {
2483
2483
Align RedAlign2 = UseABI ? DL.getABITypeAlign(Ty) : DL.getPrefTypeAlign(Ty);
2484
2484
if (RedAlign2 < RedAlign)
2485
2485
RedAlign = RedAlign2;
2486
+
2487
+ if (!getMachineFunction().getFrameInfo().isStackRealignable())
2488
+ // If the stack is not realignable, the alignment should be limited to the
2489
+ // StackAlignment
2490
+ RedAlign = std::min(RedAlign, StackAlign);
2486
2491
}
2487
2492
2488
2493
return RedAlign;
Original file line number Diff line number Diff line change @@ -17,4 +17,22 @@ entry:
17
17
ret i32 %b
18
18
}
19
19
20
+ define i32 @foo2 (i32 %arg1 ) #1 {
21
+ ; CHECK-LABEL: foo2:
22
+ ; CHECK: # %bb.0: # %entry
23
+ ; CHECK-NEXT: # kill: def $edi killed $edi def $rdi
24
+ ; CHECK-NEXT: vxorps %xmm0, %xmm0, %xmm0
25
+ ; CHECK-NEXT: vmovups %ymm0, -{{[0-9]+}}(%rsp)
26
+ ; CHECK-NEXT: vmovups %ymm0, -{{[0-9]+}}(%rsp)
27
+ ; CHECK-NEXT: andl $31, %edi
28
+ ; CHECK-NEXT: movzwl -72(%rsp,%rdi,2), %eax
29
+ ; CHECK-NEXT: vzeroupper
30
+ ; CHECK-NEXT: retq
31
+ entry:
32
+ %a = extractelement <32 x i16 > zeroinitializer , i32 %arg1
33
+ %b = zext i16 %a to i32
34
+ ret i32 %b
35
+ }
36
+
20
37
attributes #0 = { "no-realign-stack" "target-cpu" ="skylake-avx512" }
38
+ attributes #1 = { "no-realign-stack" "target-cpu" ="skylake" }
You can’t perform that action at this time.
0 commit comments