tra added a comment.

> clang should pass `-mno-amdgpu-ieee` to -cc1

It would be useful to have some details on why we should pass that option.



================
Comment at: clang/test/Driver/hip-options.hip:133
+// IEEE-ON-NOT: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} 
"-mamdgpu-ieee"
+// IEEE-ON-NOT: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} 
"-mno-amdgpu-ieee"
+
----------------
Nit: Both lines could be collapsed into matching `"-m{{(no-)?}}amdgpu-ieee"` 
Either way is fine.


================
Comment at: clang/test/Driver/hip-options.hip:137-138
+// RUN:   --cuda-gpu-arch=gfx906  %s 2>&1 | FileCheck 
-check-prefixes=IEEE-OFF,IEEE-OFF-NEG %s
+// IEEE-OFF-NEG-NOT: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} 
"-mamdgpu-ieee"
+// IEEE-OFF-DAG: clang{{.*}} "-triple" "amdgcn-amd-amdhsa" {{.*}} 
"-mno-amdgpu-ieee"
----------------
This looks odd. 
If the DAG line matches on the first clang invocation, the NEG-NOT will always 
succeed, because it will have nothing to check.

If clang invocation with `-no-mamdgpu-ieee` happens to be before the invocation 
with `-mamdgpu-ieee`, then the NEG-NOT will not succeed.

Do I understand it correctly that the idea here is to make sure that only 
`-mno-amdgpu-ieee` is ever passed to cc1?
What's the purpose of -DAG? Do you expect to see multiple cc1 with `"-triple" 
"amdgcn-amd-amdhsa"` ? AFAICT there should be only one for gfx906 and DAG 
should not be needed.

The -NOT check I'd do in a separate RUN.




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

https://reviews.llvm.org/D145721

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to