diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2007-11-20 08:24:44 +0000 | 
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2007-11-20 08:24:44 +0000 | 
| commit | ef94749b4c1d8b754b63ab20f3c82c7593ba8243 (patch) | |
| tree | 7e715ba0cd375ad406ed636e7eddaa92849d36c3 /test/Analysis | |
| parent | f77e37cc074c8c39eec664de42b67a7278d0f8b6 (diff) | |
| download | external_llvm-ef94749b4c1d8b754b63ab20f3c82c7593ba8243.zip external_llvm-ef94749b4c1d8b754b63ab20f3c82c7593ba8243.tar.gz external_llvm-ef94749b4c1d8b754b63ab20f3c82c7593ba8243.tar.bz2 | |
Be more careful when transforming | to +. Patch from Wojciech Matyjewicz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis')
| -rw-r--r-- | test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll | 18 | 
1 files changed, 18 insertions, 0 deletions
| diff --git a/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll b/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll new file mode 100644 index 0000000..830a402 --- /dev/null +++ b/test/Analysis/ScalarEvolution/2007-11-18-OrInstruction.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | opt -analyze -scalar-evolution 2>&1 | grep -e '-->  %b' +; PR1810 + +define void @fun() { +entry: +        br label %header +header: +        %i = phi i32 [ 1, %entry ], [ %i.next, %body ] +        %cond = icmp eq i32 %i, 10 +        br i1 %cond, label %exit, label %body +body: +        %a = mul i32 %i, 5 +        %b = or i32 %a, 1 +        %i.next = add i32 %i, 1 +        br label %header +exit:         +        ret void +} | 
