31 lines · plain
1; RUN: opt < %s -passes=ipsccp -S | FileCheck %s2 3; This transformation is safe for atomic loads and stores; check that it works.4 5@G = internal global i32 176@C = internal constant i32 2227 8define i32 @test1() {9 %V = load atomic i32, ptr @G seq_cst, align 410 %C = icmp eq i32 %V, 1711 br i1 %C, label %T, label %F12T:13 store atomic i32 17, ptr @G seq_cst, align 414 ret i32 %V15F: 16 store atomic i32 123, ptr @G seq_cst, align 417 ret i32 018}19; CHECK-LABEL: define i32 @test1(20; CHECK-NOT: store21; CHECK: ret i32 1722 23define i32 @test2() {24 %V = load atomic i32, ptr @C seq_cst, align 425 ret i32 %V26}27 28; CHECK-LABEL: define i32 @test2(29; CHECK-NOT: load30; CHECK: ret i32 22231