From f1277450abe79091812d084e6dcc6c9847cff348 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 22 Dec 2003 05:24:45 +0000 Subject: [PATCH] new testcase for cananonicalization of subtracts llvm-svn: 10581 --- .../Transforms/IndVarsSimplify/subtract.ll | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll diff --git a/llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll b/llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll new file mode 100644 index 000000000000..49f40891728a --- /dev/null +++ b/llvm/test/Regression/Transforms/IndVarsSimplify/subtract.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar + +%G = global long 0 + +void %test(long %V) { + br label %Loop +Loop: + %X = phi long [1, %0], [%X.next, %Loop] + %X.next = sub long %X, %V + store long %X, long* %G + br label %Loop +}