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: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
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._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs