[llvm-bugs] [Bug 42619] New: DivRemPairs is incorrect in the presence of undef
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Jul 14 08:17:57 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42619
Bug ID: 42619
Summary: DivRemPairs is incorrect in the presence of undef
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: nunoplopes at sapo.pt
CC: llvm-bugs at lists.llvm.org, regehr at cs.utah.edu,
spatel+llvm at rotateright.com
See, for example:
$ opt -div-rem-pairs Transforms/DivRemPairs/X86/div-rem-pairs.ll
define void @decompose_illegal_srem_same_block(i32 %a, i32 %b) {
%rem = srem i32 %a, %b
%div = sdiv i32 %a, %b
call void @foo(i32 %rem, i32 %div)
ret void
}
=>
define void @decompose_illegal_srem_same_block(i32 %a, i32 %b) {
%div = sdiv i32 %a, %b
%1 = mul i32 %div, %b
%2 = sub i32 %a, %1
call void @foo(i32 %2, i32 %div)
ret void
}
Transformation doesn't verify!
ERROR: Source is more defined than target
Example:
i32 %a = undef
i32 %b = #x00000001 (1)
Source:
i32 %rem = #x00000000 (0)
i32 %div = undef
Target:
i32 %div = #x7fffffff (2147483647)
i32 %1 = undef
i32 %2 = undef
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190714/f05717bb/attachment.html>
More information about the llvm-bugs
mailing list