[X86] Introduce x86-cmov-converter-force-all
authorAmir Ayupov <aaupov@fb.com>
Wed, 16 Feb 2022 01:27:31 +0000 (17:27 -0800)
committerAmir Ayupov <aaupov@fb.com>
Thu, 24 Feb 2022 18:47:22 +0000 (10:47 -0800)
commite38fc14c43b00f0606ad31a6df9dad1c54413afc
treed1a9d9db3b0df9314375f8d7b488609c3cdb2a05
parentdc7a624e3839b44fbf78149a044460919bdbfaed
[X86] Introduce x86-cmov-converter-force-all

Introduce an option to expand all CMOV groups into hammocks, matching GCC's
`-fno-if-conversion2` flag. The motivation is to leave CMOV conversion
opportunities to a binary optimizer that can make the decision based on branch
misprediction rate (available e.g. in Intel's LBR).

Reviewed By: MaskRay, skan

Differential Revision: https://reviews.llvm.org/D119777
llvm/lib/Target/X86/X86CmovConversion.cpp
llvm/test/CodeGen/X86/x86-cmov-converter.ll