https://llvm.org/bugs/show_bug.cgi?id=30832
Bug ID: 30832
Summary: Can't fold a reload if spill size doesn't match use
size
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
This is something we currently explicitly don't do because targets aren't
required to support it (InlinerSpiller::foldMemoryOperand()).
So for:
target triple = "x86_64-unknown-linux-gnu"
define i32 @foo(i64 %add, i32 %ret) {
entry:
tail call void asm sideeffect "",
"~{rax},~{rbx},~{rcx},~{rdx},~{rdi},~{rbp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"()
%conv3 = zext i32 %ret to i64
%sub = sub i64 %conv3, %add
%conv1 = trunc i64 %sub to i32
ret i32 %conv1
}
we generate:
[...]
movq %rdi, -8(%rsp) # 8-byte Spill
movq -8(%rsp), %rax # 8-byte Reload
subl %eax, %esi
[...]
The same also happens for vector registers (spill ymm, reload ymm, use xmm).
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs