forked from OSchip/llvm-project
[DX] Remove IntrNoMem from create handle intrinsic
The create handle intrinsic calls can't be removed, so it was incorrect to mark them as IntrNoMem.
This commit is contained in:
parent
f7872cdce1
commit
ee4d815008
|
@ -18,5 +18,5 @@ def int_dx_thread_id_in_group : Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoM
|
|||
def int_dx_flattened_thread_id_in_group : Intrinsic<[llvm_i32_ty], [], [IntrNoMem, IntrWillReturn]>;
|
||||
|
||||
def int_dx_create_handle : ClangBuiltin<"__builtin_hlsl_create_handle">,
|
||||
Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrNoMem, IntrWillReturn]>;
|
||||
Intrinsic<[ llvm_ptr_ty ], [llvm_i8_ty], [IntrWillReturn]>;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
; RUN: opt %s -early-cse -S | FileCheck %s
|
||||
|
||||
define void @fn() {
|
||||
entry:
|
||||
%0 = tail call ptr @llvm.dx.create.handle(i8 1)
|
||||
%1 = tail call ptr @llvm.dx.create.handle(i8 1)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: mustprogress nounwind willreturn
|
||||
declare ptr @llvm.dx.create.handle(i8) #0
|
||||
|
||||
attributes #0 = { mustprogress nounwind willreturn }
|
||||
|
||||
; CSE needs to leave this alone
|
||||
; CHECK: %0 = tail call ptr @llvm.dx.create.handle(i8 1)
|
||||
; CHECK: %1 = tail call ptr @llvm.dx.create.handle(i8 1)
|
Loading…
Reference in New Issue