[PATCH] D115283: [AMDGPU] Set "amdgpu_hostcall" module flag if an AMDGPU function has calls to device lib functions that use hostcalls.

Konstantin Pyzhov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 8 11:02:19 PST 2021


kpyzhov added inline comments.


================
Comment at: clang/test/CodeGenHIP/amdgpu_hostcall.cpp:2-6
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -DFN_HOSTCALL \
+// RUN:   -o - %s | FileCheck --enable-var-scope %s
+
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -x hip -emit-llvm -fcuda-is-device -DFN_PRINTF \
+// RUN:   -o - %s | FileCheck --enable-var-scope %s
----------------
dfukalov wrote:
> Am I right we don't actually need two runs here, the test may be executed with one run, removed `#ifdefs` and, possible, multiplied `CHECK:` lines?
> I would suggest to use the llvm/utils/update_cc_test_checks.py script in such tests.
Well, it may be executed with one run, but in that case we won't be able to catch an error if one of the functions is broken, because the 2nd one will set the module flag.
Why do you think I should use the script for this test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115283/new/

https://reviews.llvm.org/D115283



More information about the cfe-commits mailing list