llvm-6502/test/CodeGen/X86/pr3018.ll
Dan Gohman dbe664adcd Fix SelectionDAG::ReplaceAllUsesWith to behave correctly when
uses are added to the From node while it is processing From's
use list, because of automatic local CSE. The fix is to avoid
visiting any new uses.

Fix a few places in the DAGCombiner that assumed that after
a RAUW call, the From node has no users and may be deleted.

This fixes PR3018.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:44:21 +00:00

9 lines
170 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 | grep {orl \$1}
define i32 @test(i32 %A) nounwind {
%B = or i32 %A, 1
%C = or i32 %B, 1
%D = and i32 %C, 7057
ret i32 %D
}