xref: /llvm-project/llvm/test/Transforms/AtomicExpand/X86/expand-atomic-rmw-initial-load.ll (revision fe42e72db29e48aa81eac2aa922afd90a7f01517)
1; RUN: opt -S %s -passes=atomic-expand -mtriple=i686-linux-gnu | FileCheck %s
2
3; This file tests the function `llvm::expandAtomicRMWToCmpXchg`.
4; It isn't technically target specific, but is exposed through a pass that is.
5
6define i8 @test_initial_load(ptr %ptr, i8 %value) {
7  %res = atomicrmw nand ptr %ptr, i8 %value seq_cst
8  ret i8 %res
9}
10; CHECK-LABEL: @test_initial_load
11; CHECK-NEXT:    %1 = load i8, ptr %ptr, align 1
12