From 33d0474bf5d5783cf9690bcab3eabd513d918fc5 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 20 Jul 2009 21:16:08 +0000 Subject: Use TII->findCommutedOpIndices to find the commute operands (rather than guessing). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76472 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll (limited to 'test/CodeGen/Thumb') diff --git a/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll b/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll new file mode 100644 index 0000000..3e18d29 --- /dev/null +++ b/test/CodeGen/Thumb/2009-07-20-TwoAddrBug.ll @@ -0,0 +1,11 @@ +; RUN: llvm-as < %s | llc -mtriple=thumbv6-apple-darwin10 + +@Time.2535 = external global i64 ; [#uses=2] + +define arm_apcscc i64 @millisecs() nounwind { +entry: + %0 = load i64* @Time.2535, align 4 ; [#uses=2] + %1 = add i64 %0, 1 ; [#uses=1] + store i64 %1, i64* @Time.2535, align 4 + ret i64 %0 +} -- cgit v1.1