[LLVMbugs] [Bug 9215] New: Reassociate zaps nsw/nuw flags even if it doesn't do anything
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Feb 14 04:55:59 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9215
Summary: Reassociate zaps nsw/nuw flags even if it doesn't do
anything
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: baldrick at free.fr
CC: llvmbugs at cs.uiuc.edu
Testcase:
define i32 @add(i32 %x, i32 %y) {
%s = add nsw i32 %x, %y
ret i32 %s
}
$ opt -reassociate -S -o - nsw.ll
; ModuleID = 'nsw.ll'
define i32 @add(i32 %x, i32 %y) {
%s = add i32 %y, %x
ret i32 %s
}
What would be great (and should automatically fix this) would be to have
reassociate add a nsw/nuw flag to the results of its reassociations if all
operations that participated were nsw/nuw.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list