[LLVMbugs] instcombine fix

Casey Carter ccarter at cs.uiuc.edu
Thu Dec 5 13:28:32 PST 2002


I noticed that one of the reassociate regression tests -- 
2002-07-09-DominanceProblem -- was failing.  instcombine was transforming

%A.neg = sub int 0, %A
%.neg = sub int 0, 1
%X = add int %.neg, 1
%Y.neg.ra = add int %A, %X
%r = add int %A.neg, %Y.neg.ra
ret int %r

into

%Y.neg.ra = add int %A, 0
%r = add int %A.neg, %Y.neg.ra
ret int %r

without reexamining %Y.neg.ra to see that it is clearly replacable by 
%A.  The problem is that instcombine's runOnFunction does not add uses 
of a constant-folded instruction into its worklist for examination.

-- 
Casey Carter
Casey at Carter.net
ccarter at uiuc.edu
AIM: cartec69

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20021205/93fbd8e3/attachment.ksh>


More information about the llvm-bugs mailing list