File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
llvm/test/tools/llvm-reduce Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ ; Check token values are correctly handled by operands-skip
2+
3+ ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=operands-skip --test FileCheck --test-arg --check-prefix=INTERESTING --test-arg %s --test-arg --input-file %s -o %t
4+ ; RUN: FileCheck -check-prefix=RESULT %s < %t
5+
6+ ; INTERESTING-LABEL: define void @tokens(
7+ ; INTERESTING: call void @llvm.token.consumer
8+
9+ ; RESULT-LABEL: define void @tokens(ptr %ptr) {
10+ ; RESULT-NEXT: %token = call token @llvm.token.producer()
11+ ; RESULT-NEXT:store i32 0, ptr %ptr, align 4
12+ ; RESULT-NEXT:%chain = call token @llvm.token.chain(token %token)
13+ ; RESULT-NEXT:call void @llvm.token.consumer(token %token)
14+ ; RESULT-NEXT:store i32 1, ptr %ptr, align 4
15+ ; RESULT-NEXT:ret void
16+ define void @tokens (ptr %ptr ) {
17+ %token = call token @llvm.token.producer ()
18+ store i32 0 , ptr %ptr
19+ %chain = call token @llvm.token.chain (token %token )
20+ call void @llvm.token.consumer (token %chain ) ; -> rewrite to use %token directly
21+ store i32 1 , ptr %ptr
22+ ret void
23+ }
24+
25+ declare token @llvm.token.producer ()
26+ declare token @llvm.token.chain (token)
27+ declare void @llvm.token.consumer (token)
You can’t perform that action at this time.
0 commit comments