[clang] e47a81c - [OpenCL] Fix BIenqueue_kernel fallthrough (#83238)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 00:31:42 PDT 2024


Author: Sven van Haastregt
Date: 2024-04-02T09:31:38+02:00
New Revision: e47a81c1d2830dda45a561e2c092ebb0c868ed27

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

LOG: [OpenCL] Fix BIenqueue_kernel fallthrough (#83238)

Handling of the `BIenqueue_kernel` builtin must not fallthrough to the
`BIget_kernel_work_group_size` builtin, as these builtins have no common
functionality.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGBuiltin.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index bb007231c0b783..483f9c26859923 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -5835,7 +5835,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
         EmitLifetimeEnd(TmpSize, TmpPtr);
       return Call;
     }
-    [[fallthrough]];
+    llvm_unreachable("Unexpected enqueue_kernel signature");
   }
   // OpenCL v2.0 s6.13.17.6 - Kernel query functions need bitcast of block
   // parameter.


        


More information about the cfe-commits mailing list