; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 ; Test that the alloc-token pass lowers the intrinsic to a constant token ID. ; ; RUN: opt < %s -passes='alloc-token' -alloc-token-max=2 -S | FileCheck %s target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" declare i64 @llvm.alloc.token.id.i64(metadata) define i64 @test_intrinsic_lowering() { ; CHECK-LABEL: define i64 @test_intrinsic_lowering() { ; CHECK-NEXT: [[ENTRY:.*:]] ; CHECK-NEXT: ret i64 0 ; entry: %token_no_ptr = call i64 @llvm.alloc.token.id.i64(metadata !0) ret i64 %token_no_ptr } define i64 @test_intrinsic_lowering_ptr() { ; CHECK-LABEL: define i64 @test_intrinsic_lowering_ptr() { ; CHECK-NEXT: [[ENTRY:.*:]] ; CHECK-NEXT: ret i64 1 ; entry: %token_with_ptr = call i64 @llvm.alloc.token.id.i64(metadata !1) ret i64 %token_with_ptr } !0 = !{!"NoPointerType", i1 false} !1 = !{!"PointerType", i1 true}