[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 10 13:30:21 PDT 2023
MaskRay added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7228
+ } else {
+ Args.ClaimAllArgs(options::OPT_fgpu_approx_transcendentals);
+ Args.ClaimAllArgs(options::OPT_fno_gpu_approx_transcendentals);
----------------
You can use `Args.claimAllArgs(options::OPT_fgpu_approx_transcendentals, options::OPT_fno_gpu_approx_transcendentals);`
================
Comment at: clang/test/Driver/hip-options.hip:184
+
+// APPROX: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} "-fgpu-approx-transcendentals"
+// APPROX: clang{{.*}} "-triple" "x86_64-unknown-linux-gnu" {{.*}} "-fgpu-approx-transcendentals"
----------------
Just test `-cc1`: `// APPROX: "-cc1"{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} "-fgpu-approx-transcendentals"`
Testing `clang` requires `-no-canonical-prefixes` https://maskray.me/blog/2021-03-28-compiler-driver-and-cross-compilation#misc
================
Comment at: clang/test/Driver/hip-options.hip:209
+
+// APPROXNEG-NOT: warning
----------------
If `%t` happens to be in a path with `warning` as a substring, this will spuriously fail.
Suggest `%clang -fdriver-only -Werror... 2>&1 | count 0` to test that there is no warning/error.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154797/new/
https://reviews.llvm.org/D154797
More information about the cfe-commits
mailing list