[X86] Lower vector umax(x,1) -> sub(x,cmpeq(x,0))
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 7 Mar 2023 15:38:46 +0000 (15:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 7 Mar 2023 15:38:53 +0000 (15:38 +0000)
commit7709480219f97df6729f5a7af68630774852f874
tree867cd2df3180e6166a5ea059259704dd183b0006
parent110ce5ab76449f06058e49a154b9b741c75c9d05
[X86] Lower vector umax(x,1) -> sub(x,cmpeq(x,0))

With suitable BooleanContent handling we could move this to TargetLowering::expandIntMINMAX, but this is good enough for X86

Fixes #61225
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/umax.ll