xref: /llvm-project/llvm/test/Transforms/EarlyCSE/readnone-mayunwind.ll (revision ac696ac4530fb3df626195e94e83649bf7114754)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt -S -passes=early-cse -earlycse-debug-hash < %s | FileCheck %s
3
4declare void @readnone_may_unwind() readnone
5
6define void @f(ptr %ptr) {
7; CHECK-LABEL: @f(
8; CHECK-NEXT:    store i32 100, ptr [[PTR:%.*]], align 4
9; CHECK-NEXT:    call void @readnone_may_unwind()
10; CHECK-NEXT:    store i32 200, ptr [[PTR]], align 4
11; CHECK-NEXT:    ret void
12;
13
14  store i32 100, ptr %ptr
15  call void @readnone_may_unwind()
16  store i32 200, ptr %ptr
17  ret void
18}
19