[PATCH] D155095: TargetLowering: fix an infinite DAG combine in SimplifySETCC

Jon Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 11:15:44 PDT 2023


jroelofs added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:4230
 
   // Ensure that the constant occurs on the RHS and fold constant comparisons.
   // TODO: Handle non-splat vector constants. All undef causes trouble.
----------------
craig.topper wrote:
> Doesn't this change prevent folding constant comparisons? But maybe that's handled by the FoldSetCC above? Was that added later than this comment was written?
Looks like this commit is the original source of that comment:

https://github.com/llvm/llvm-project/commit/65919b5058e155df43c248a18b5ecba52bd4d20f

I don't follow how this ever facilitated constant folding. But yes, looks like FoldSetCC was added later, and it takes care of those duties. I'll update the comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155095



More information about the llvm-commits mailing list