[PATCH] D158068: [DAG] FoldSetCC - add missing icmp(X,undef) -> isTrueWhenEqual case

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 05:58:14 PDT 2023


arsenm added inline comments.
Herald added a subscriber: sunshaoce.


================
Comment at: llvm/test/CodeGen/AMDGPU/swdev373493.ll:57
 bb:
   switch i32 undef, label %bb9 [
     i32 3, label %bb8
----------------
yassingh wrote:
> RKSimon wrote:
> > nikic wrote:
> > > Don't switch on undef...
> > @yassingh This was added at D141895 - can this be replaced with the switch i32 %arg?
> This came up in that review too. The test in question was generated by a lot of automatic reductions over a larger failure, I couldn't get rid of undef then either. 
You need to replace it with a uniform value. If you just add a regular function argument, it will be divergent which is a much more radical change. The easiest update would probably be to swap the triple to amdpal from amdhsa, use amdgpu_gfx for the calling convention and make the new argument inreg


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158068



More information about the llvm-commits mailing list