[llvm] f047cb4 - [OpenMP] Fix incompatible attributes in OpenMPIRBuilder test.

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 08:57:41 PDT 2021


Author: Joseph Huber
Date: 2021-04-13T11:57:28-04:00
New Revision: f047cb45bd3837d39b0a1bb4262c805ddd4cf1cb

URL: https://github.com/llvm/llvm-project/commit/f047cb45bd3837d39b0a1bb4262c805ddd4cf1cb
DIFF: https://github.com/llvm/llvm-project/commit/f047cb45bd3837d39b0a1bb4262c805ddd4cf1cb.diff

LOG: [OpenMP] Fix incompatible attributes in OpenMPIRBuilder test.

Summary:
After D98740 the function attributes were changes to append rather than
overwrite when using the values defined in OMPKinds.def. One of the
OpenMPIRBuilder tests erroenously used `readnone` instead of `readonly` which
would cause a conflict and result in a broken module once `readonly` was
appended to it. This patch fixes the test to use the correct attributes.

Added: 
    

Modified: 
    llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll b/llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll
index 0a8d7a9d231ae..f1f457c6e43e1 100644
--- a/llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll
+++ b/llvm/test/Transforms/OpenMP/gpu_state_machine_function_ptr_replacement.ll
@@ -1,3 +1,4 @@
+; RUN: opt -S -passes=openmpopt -openmp-ir-builder-optimistic-attributes -pass-remarks=openmp-opt -openmp-print-gpu-kernels < %s | FileCheck %s
 ; RUN: opt -S -passes=openmpopt -pass-remarks=openmp-opt -openmp-print-gpu-kernels < %s | FileCheck %s
 ; RUN: opt -S        -openmpopt -pass-remarks=openmp-opt -openmp-print-gpu-kernels < %s | FileCheck %s
 
@@ -143,9 +144,9 @@ declare zeroext i1 @__kmpc_kernel_parallel(i8** nocapture %WorkFn)
 
 declare void @__kmpc_kernel_end_parallel()
 
-declare void @__kmpc_barrier_simple_spmd(%struct.ident_t* nocapture readnone %loc_ref, i32 %tid)
+declare void @__kmpc_barrier_simple_spmd(%struct.ident_t* nocapture readonly %loc_ref, i32 %tid)
 
-declare i32 @__kmpc_global_thread_num(%struct.ident_t* nocapture readnone)
+declare i32 @__kmpc_global_thread_num(%struct.ident_t* nocapture readonly)
 
 
 !nvvm.annotations = !{!0}


        


More information about the llvm-commits mailing list