OpenMP: Adjust test scan for 'device_type(host)' handling
Repairs test case scanning for OpenMP's 'device_type(host)' handling to match actual offload tree dump output.
This commit adjusts the tree dump scanning in a libgomp test case (libgomp.c/target-device-type-3.c) to correctly verify the handling of device_type(host) within OpenMP target regions. The previous test directives did not match the actual output generated by the compiler after a related change, leading to ‘UNRESOLVED’ test results. The fix updates the scan patterns and targets to align with the compiler’s behavior when offloading to devices.
In Details
Following changes to OpenMP's device_type(host) handling, the tree dump verification in libgomp.c/target-device-type-3.c was failing. This commit corrects the dg-final directives, specifically the --scan-tree-dump patterns and the target specification for optimized dumps, to accurately reflect the compiler's output when offloading is considered. The patterns are updated to use scan-amdgcn-amdhsa-offload-tree-dump where appropriate, and expected strings are adjusted.
- tree dump
- Compiler output that shows the program's structure at various intermediate stages (e.g., Gimple, RTL). It's used for debugging and analyzing compiler behavior, particularly for verifying optimizations and transformations.
- offload
- A technique in parallel computing where parts of a program are executed on a separate device, such as a GPU or a coprocessor, while the main part runs on the host CPU. OpenMP provides directives like
#pragma omp targetto facilitate offloading.