llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[OpenMP] Offload should assume non-zero trip count for associated loops

Open jdoerfert opened this issue 2 years ago • 1 comments

If we offload and have associated loops we pass the trip count to the runtime call to launch the kernel. If the trip count is 0 we should not launch the kernel at all. We should also add an assumption into the kernel that the trip count is at least one.

The icmp in line 34 is the one we can consequently remove: https://godbolt.org/z/rYhczcd1j

jdoerfert avatar Jun 27 '23 18:06 jdoerfert

@llvm/issue-subscribers-openmp

llvmbot avatar Jun 27 '23 18:06 llvmbot