================
@@ -1,26 +1,53 @@
-; Verify that when passing in command-line options to NVVMReflect, that 
reflect calls are replaced with
-; the appropriate command line values.
+; Test the NVVM reflect pass functionality: verifying that reflect calls are 
replaced with 
+; appropriate values based on command-line options. Verify that we can handle 
custom reflect arguments
+; that aren't __CUDA_ARCH or __CUDA_FTZ. If that argument is given a value on 
the command-line, the reflect call should be replaced with that value.
+; Otherwise, the reflect call should be replaced with 0.
+
+; RUN: opt -passes=nvvm-reflect -mtriple=nvptx-nvidia-cuda -nvvm-reflect-add 
__CUDA_FTZ=1 -nvvm-reflect-add __CUDA_ARCH=350 %s -S | FileCheck %s 
--check-prefix=CHECK-FTZ1 --check-prefix=CHECK-ARCH350 
--check-prefix=CHECK-CUSTOM-ABSENT
+; RUN: opt -passes=nvvm-reflect -mtriple=nvptx-nvidia-cuda -nvvm-reflect-add 
__CUDA_FTZ=0 -nvvm-reflect-add __CUDA_ARCH=520 %s -S | FileCheck %s 
--check-prefix=CHECK-FTZ0 --check-prefix=CHECK-ARCH520 
--check-prefix=CHECK-CUSTOM-ABSENT
----------------
Artem-B wrote:

Long run lines should be split into separate lines:

```
RUN: opt ..... \
RUN:   | FileCheck .....
```

https://github.com/llvm/llvm-project/pull/134416
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to