[PATCH] D137422: [DAGCombine] Generalize foldSelectCCToShiftAnd

Mikhail Gudim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 00:52:38 PST 2022


mgudim added a comment.

In D137422#3923194 <https://reviews.llvm.org/D137422#3923194>, @craig.topper wrote:

> Do the SETLE and SETGE cases occur? I thought DAGCombine always changes those to SETLT and SETGE by changing the constant?

@craig.topper 
Yes, you're right. I worked on this a month ago and some cases didn't work. Today I ran the latest master and everything worked. The simplification happend in `SimpifySetCC`. I am not sure what changed exactly.  Anyway, the approach with canonicalizing `SETCC`  is much better than making all other combines handle all the posibilities.

Thanks for taking a look! I'll close this diff.


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

https://reviews.llvm.org/D137422



More information about the llvm-commits mailing list