From bfd5040ddc0d4413d51518f7d4f464c91eb6336e Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 16 Aug 2011 23:29:17 +0000 Subject: [PATCH] An additional atomic test; related to r137662. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137786 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/atomic.ll | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/Transforms/InstCombine/atomic.ll b/test/Transforms/InstCombine/atomic.ll index 2b77010fefd..097cf5eafe0 100644 --- a/test/Transforms/InstCombine/atomic.ll +++ b/test/Transforms/InstCombine/atomic.ll @@ -13,3 +13,12 @@ define i32* @test1(i8** %p) { ret i32* %r } +define i32 @test2(i32* %p) { +; CHECK: define i32 @test2 +; CHECK: %x = load atomic i32* %p seq_cst, align 4 +; CHECK: shl i32 %x, 1 + %x = load atomic i32* %p seq_cst, align 4 + %y = load i32* %p, align 4 + %z = add i32 %x, %y + ret i32 %z +} -- 2.34.1