[X86] (0 - SetCC) | C -> (zext (not SetCC)) * (C + 1) - 1 if we can get a LEA out...
authorAmaury Séchet <deadalnix@gmail.com>
Sun, 7 Aug 2022 03:03:50 +0000 (03:03 +0000)
committerAmaury Séchet <deadalnix@gmail.com>
Wed, 10 Aug 2022 15:12:00 +0000 (15:12 +0000)
commit9bceb8981d32fe9465257c31413395f445ab05d8
treeef7108c9a7e65fd9bdb05a944f13a5eee74ae9d0
parentf43b2285815961da057af1a772bc31d0152d286b
[X86] (0 - SetCC) | C -> (zext (not SetCC)) * (C + 1) - 1 if we can get a LEA out of it.

This adresses various regression in D131260 , as well as is a useful optimization in itself.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D131358
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/or-lea.ll