From b211b5c4788e16aa0e0e6661715ad99886daf387 Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 23 Apr 2009 04:26:42 +0000 Subject: [PATCH] Testcase for PR2537. llvm-svn: 69866 --- .../Transforms/LoopStrengthReduce/pr2537.ll | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 llvm/test/Transforms/LoopStrengthReduce/pr2537.ll diff --git a/llvm/test/Transforms/LoopStrengthReduce/pr2537.ll b/llvm/test/Transforms/LoopStrengthReduce/pr2537.ll new file mode 100644 index 000000000000..e9be384e6f7a --- /dev/null +++ b/llvm/test/Transforms/LoopStrengthReduce/pr2537.ll @@ -0,0 +1,21 @@ +; RUN: llvm-as < %s | opt -loop-reduce -disable-output +; PR 2537 + +define void @a() { +entry: + br label %dobody + +dobody: ; preds = %dobody, %entry + %y.0 = phi i128 [ 0, %entry ], [ %add, %dobody ] + %x.0 = phi i128 [ 0, %entry ], [ %add2, %dobody ] + %add = add i128 %y.0, shl (i128 1, i128 64) + %add2 = add i128 %x.0, shl (i128 1, i128 48) + call void @b( i128 %add ) + %cmp = icmp ult i128 %add2, shl (i128 1, i128 64) + br i1 %cmp, label %dobody, label %afterdo + +afterdo: ; preds = %dobody + ret void +} + +declare void @b(i128 %add) \ No newline at end of file