As noted by @andreadb in https://reviews.llvm.org/D59035#inline-525780
If we have sext ([trunc] (cmov C0, C1)), we can instead do cmov (sext ([trunc] (C0))), (sext ([trunc] (C1)))
Paths
| Differential D59412
[X86] X86ISelLowering::combineSextInRegCmov(): also handle i8 CMOV's ClosedPublic Authored by lebedev.ri on Mar 15 2019, 6:44 AM.
Details Summary As noted by @andreadb in https://reviews.llvm.org/D59035#inline-525780 If we have sext ([trunc] (cmov C0, C1)), we can instead do cmov (sext ([trunc] (C0))), (sext ([trunc] (C1)))
Diff Detail
Event Timeline
lebedev.ri marked 3 inline comments as done. Comment ActionsPromote i16 CMOV's to i32, truncate afterwards. This revision is now accepted and ready to land.Mar 15 2019, 1:04 PM Comment Actions
Thank you for the review. Closed by commit rL356301: [X86] X86ISelLowering::combineSextInRegCmov(): also handle i8 CMOV's (authored by lebedevri). · Explain WhyMar 15 2019, 2:20 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 190900 llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/cmov-promotion.ll
|