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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 11:19:29 PDT 2023


craig.topper added a comment.

In D158068#4632176 <https://reviews.llvm.org/D158068#4632176>, @goldstein.w.n wrote:

> In D158068#4632046 <https://reviews.llvm.org/D158068#4632046>, @RKSimon wrote:
>
>> It was requested by @craig.topper for an upcoming patch - he noticed that D59363 <https://reviews.llvm.org/D59363> had mentioned undef handling in the comments and hadn't implemented it.
>
> I see, I'll let craig review then because I'm not really sure what the implications/potential fallout of this are.

I don't care if this gets fixed or not. I noticed it while looking at the test case in https://reviews.llvm.org/D157910 . The poison stores poisons the load which poisons the shift. Poison doesn't exist in SelectionDAG and becomes undef instead. The setcc ends up with undef. I was a little surprised it didn't get folded. Then I found the comment in FoldSetCC that said it should be.

We should either update the comment or move forward this patch. I don't necessarily care which.


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