[X86] Add a test to reveal a bug in CMOV conversion.
authorTianqing Wang <tianqing.wang@intel.com>
Tue, 29 Jun 2021 08:06:45 +0000 (16:06 +0800)
committerTianqing Wang <tianqing.wang@intel.com>
Tue, 29 Jun 2021 08:37:19 +0000 (16:37 +0800)
commit6178ddcd2b70e6a187e1960f00f5985c390a80a0
treef2d36631b81350a87931bbda52fe69e9bb356c7c
parent4d8871a898b30f11c905b27954c18d826c0953c9
[X86] Add a test to reveal a bug in CMOV conversion.

CMOV conversion first rewrites all CMOVs with memory load to branches.
Then runs a second pass to convert other CMOVs in loops if profitable.
But the first pass doesn't add new basic blocks to MachineLoopInfo,
CMOVs in these blocks are ignored in the subsequent pass.

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D104692
llvm/test/CodeGen/X86/x86-cmov-converter.ll