[PATCH] D63318: [DAGCombine] Teach DAGCombine to fold the aext + select pattern

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 06:58:38 PDT 2019


spatel added inline comments.


================
Comment at: llvm/test/CodeGen/X86/cmov-promotion.ll:59
 ; CMOV-NEXT:    movl $255, %eax
-; CMOV-NEXT:    cmovnel %ecx, %eax
+; CMOV-NEXT:    cmovneq %rcx, %rax
 ; CMOV-NEXT:    retq
----------------
steven.zhang wrote:
> craig.topper wrote:
> > The zextisfree check isn't enough to fix this :( It's an i8->i64 zext which isn't free. I guess we'll have to handle this in the x86 backend.
> Yes. The hook only check the type i32->i64. Do we need to pass the value instead of the type for the isZextFree to fix this issue ?
I don't think changing the TLI call will be enough to solve the general problem (the IR is likely already in the form that we're trying to avoid).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63318/new/

https://reviews.llvm.org/D63318





More information about the llvm-commits mailing list