[AMDGPU] improve fragile test for divergent branches
authorSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Thu, 27 Feb 2020 10:29:25 +0000 (15:59 +0530)
committerSameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>
Thu, 27 Feb 2020 18:01:03 +0000 (23:31 +0530)
commit0c8a21879872c8ca8aa5966263f9d67207b3108e
treecb0206e837c52510774a51f27bcd53b453bf08f8
parent512f345a5db163ac52bf0223f749acc6188e6138
[AMDGPU] improve fragile test for divergent branches

Summary:
The affected LIT test intends to test the correct use of divergence
analysis to detect a divergent branch with a uniform predicate. The
passes involved are LLVM IR passes, but the test runs llc and tries to
match against generated ISA, which makes it hard to demonstrate that
the intended behavior was really tested. Replaced this with a test
that invokes opt on the required passes and then checks for the
appropriate changes in the LLVM IR.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D75267
llvm/test/CodeGen/AMDGPU/divergent-branch-uniform-condition.ll