[llvm] [X86] Support APX CMOV/CFCMOV instructions (PR #82592)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 18:21:04 PST 2024


================
@@ -207,6 +219,13 @@ define zeroext i16 @select_cmov_i16(i1 zeroext %cond, i16 zeroext %a, i16 zeroex
 ; GISEL-X86-CMOV-NEXT:    cmovnew %dx, %ax
 ; GISEL-X86-CMOV-NEXT:    ## kill: def $ax killed $ax killed $eax
 ; GISEL-X86-CMOV-NEXT:    retl
+;
+; NDD-LABEL: select_cmov_i16:
+; NDD:       ## %bb.0:
----------------
XinWang10 wrote:

Because from source code, HasCMOV is rewritten, we could use it in other cases.
`def HasCMOV      : Predicate<"Subtarget->canUseCMOV()">;`
`bool canUseCMOV() const { return hasCMOV() || hasSSE1() || is64Bit(); }`


https://github.com/llvm/llvm-project/pull/82592


More information about the llvm-commits mailing list