mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 18:36:05 +00:00

Copies the same special cases that bugpoint uses. Technically the token condition is stricter than what the verifier enforces. Part 1 of #58815
22 lines
798 B
LLVM
22 lines
798 B
LLVM
; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instructions --test FileCheck --test-arg --check-prefixes=CHECK,INTERESTING --test-arg %s --test-arg --input-file %s -o %t
|
|
; RUN: FileCheck -check-prefixes=CHECK,RESULT %s < %t
|
|
|
|
; CHECK-LABEL: define void @tokens(
|
|
; INTERESTING: store i32 0
|
|
; INTERESTING: call void @llvm.token.consumer
|
|
|
|
; RESULT: %token = call token @llvm.token.producer()
|
|
; RESULT-NEXT: store i32 0, ptr %ptr, align 4
|
|
; RESULT-NEXT: call void @llvm.token.consumer(token %token)
|
|
; RESULT-NEXT: ret void
|
|
define void @tokens(ptr %ptr) {
|
|
%token = call token @llvm.token.producer()
|
|
store i32 0, ptr %ptr
|
|
call void @llvm.token.consumer(token %token)
|
|
store i32 1, ptr %ptr
|
|
ret void
|
|
}
|
|
|
|
declare token @llvm.token.producer()
|
|
declare void @llvm.token.consumer(token)
|