[PATCH] D107406: [DAGCombiner][TLI] SimplifySetCC(): recanonicalize `(X&1) != 0` (PR51312)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 3 16:01:25 PDT 2021
lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper, RKSimon.
lebedev.ri added a project: LLVM.
Herald added subscribers: pengfei, hiraditya.
lebedev.ri requested review of this revision.
`(x&1)==1` is not canonical, and we'd canonicalize it to `(x&1)!=0` already,
but that excludes it from a few folds, which eventually leads to a worse codegen.
This essentially fixes a regression after we started to canonicalize
add/xor reductions w/ i1 element type to a parity check.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107406
Files:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/SystemZ/int-cmp-47.ll
llvm/test/CodeGen/SystemZ/knownbits.ll
llvm/test/CodeGen/X86/bool-math.ll
llvm/test/CodeGen/X86/parity-vec.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107406.363898.patch
Type: text/x-patch
Size: 5072 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210803/067060db/attachment.bin>
More information about the llvm-commits
mailing list