https://bugs.llvm.org/show_bug.cgi?id=40289
Bug ID: 40289
Summary: X86: Signed Overflowing Multiplication incorrect
codegen on 32-bit Windows
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: a...@crichton.co
CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
llvm-...@redking.me.uk, spatel+l...@rotateright.com
First reported to use at rust-lang/rust it looks like a regression has happened
somewhere between 7.0.0 and the current trunk. Taking a look at godbolt --
https://godbolt.org/z/xCkFO3 -- the following IR:
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
target triple = "i686-pc-windows-msvc"
define fastcc { i64, i1 } @testit(i64 %self) {
start:
%0 = tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %self, i64 4)
ret { i64, i1 } %0
}
; Function Attrs: nounwind readnone speculatable
declare { i64, i1 } @llvm.smul.with.overflow.i64(i64, i64) #2
when compiled will `popl %esp` on trunk, but on 7.0.0 it correctly executes
`add $4, %esp`. Some local bisection using `-opt-bisect-limit` shows that this
happens during the "X86 Optimize Call Frame on function" pass.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs