[PATCH] D40556: SIFixSGPRCopies should not change non-divergent PHI

Samuel Pitoiset via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 15 08:46:23 PDT 2018


hakzsam added a comment.
Herald added a subscriber: llvm-commits.

Hi guys,

This change appears to introduce a regression. It hangs nier:automata with the RADV Vulkan driver, reverting the commit fixes the issue.

Here's the full LLVM IR of that shader https://hastebin.com/minayakiri

I have also tried to reduce the testcase, but I'm not 100% sure it's correct, in case you want to have a look too https://hastebin.com/olatenegej

After comparing with/without that change, it appears that some VGPR PHIs are SGPR PHIs now.

I know this is why this change has been submitted initially (ie. to not use VGPR PHIs when the control flow is uniform), but I wonder if the new postdominance frontier is correct is *all* situations.

The concept of VGPR/SGPR PHIs seems tricky and I'm not sure to fully understand it.

Can you check (and/or explain) if the SGPR PHIs in that shader are expected?

Thanks in advance,
Samuel.


Repository:
  rL LLVM

https://reviews.llvm.org/D40556





More information about the llvm-commits mailing list