[x86] try harder to lower to PCMPGT instead of not-of-PCMPEQ
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 May 2021 12:03:11 +0000 (08:03 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 May 2021 12:25:29 +0000 (08:25 -0400)
commitf58e0513dd95944b81ce7a6e7b49ba656de7d75f
tree055f42b440ba8279039e0213ce0032e9b7a790ef
parent24d06fff55510780eba1a267d844ee26a17d6888
[x86] try harder to lower to PCMPGT instead of not-of-PCMPEQ

This is motivated by the example in https://llvm.org/PR50055 ,
but it doesn't do anything for that bug currently because we
don't actually have a zero-extended setcc there.

Proof for the generic transform (inverse of what we would
try to do in combining):
https://alive2.llvm.org/ce/z/aBL-Mg

Differential Revision: https://reviews.llvm.org/D102275
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/setcc-lowering.ll
llvm/test/CodeGen/X86/vec_umulo.ll
llvm/test/CodeGen/X86/vsel-cmp-load.ll