[PATCH] D90113: [DAGCombiner] Fold BinOp into Select containing identity constant

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 30 08:20:53 PST 2022


nemanjai added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/cmpb.ll:243
+; CHECK-NEXT:    xor 6, 4, 3
+; CHECK-NEXT:    li 5, 0
+; CHECK-NEXT:    andi. 7, 6, 65280
----------------
xbolva00 wrote:
> laytonio wrote:
> > Large regressions here unfortunately.
> It depends, you should regenerate test checks with current codegen and then commit them.
> Then rebase this patch.
The instruction selection for this rather complex instruction is handled in `PPCDAGToDAGISel::combineToCMPB()`. The instruction does a comparison of pairs of bytes in two registers producing a byte with all `1`'s if the two bytes are equal and all `0`'s if they are not.

Presumably the DAG that comes out for this after your transformation looks different enough that the idiom recognition for that instruction is no longer capable of detecting the DAG.

But I agree that you should produce the test checks with the script so we can see the direct comparison of the full codegen.


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

https://reviews.llvm.org/D90113



More information about the llvm-commits mailing list