[PATCH] D98958: [NewPM] Disable non-trivial loop-unswitch on targets with divergence

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 22 17:38:22 PDT 2021


sameerds added inline comments.


================
Comment at: llvm/test/Transforms/LoopUnswitch/AMDGPU/divergent-unswitch.ll:16
-
-define amdgpu_kernel void @uniform_unswitch(i32 * nocapture %out, i32 %n, i32 %x) {
-entry:
----------------
tra wrote:
> Perhaps the test should be replaced with a test that verifies that unswitch does *not* happen.
I am not sure what you mean. I am guessing that the way phab presents this change might be to blame. There are two files: divergent-unswitch.ll (this file) and a new uniform-unswitch.ll. This file checks that the divergent unswitch does not happen, and passes.

The part that carries this comment is moved to uniform-unswitch.ll, where it is checked to ensure that the uniform unswitch does happen. But the new behaviour conservatily treats all non-trivial branches as divergent, and hence the new test is marked as XFAIL.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98958



More information about the llvm-commits mailing list