[DAG] SimplifySetCC - relax fold (X^C1) == C2 --> X == C1^C2
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 Apr 2022 08:18:08 +0000 (09:18 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 6 Apr 2022 08:18:08 +0000 (09:18 +0100)
commit9e97b2a477f3b9bdd1ef7954ce22e15d15fb54d8
tree3a37cf504bdd7b0c59f9fb86d95cfd2f6e6545ef
parented4e6e03981a37d54c4ac635b2bdb2c2fe8fec92
[DAG] SimplifySetCC - relax fold (X^C1) == C2 --> X == C1^C2

https://alive2.llvm.org/ce/z/A_auBq

Remove limitation that wouldn't perform the fold if all the inverted bits are known zero

The thumb2 changes look to be benign, although it does show that the TEQ/TST isel patterns could probably be improved.

Fixes movmsk regression in D122754

Differential Revision: https://reviews.llvm.org/D123023
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/Mips/countleading.ll
llvm/test/CodeGen/Thumb2/thumb2-teq.ll
llvm/test/CodeGen/X86/peep-test-3.ll