[X86] Remove unnecessary COPY from EmitLoweredCascadedSelect.
authorCraig Topper <craig.topper@sifive.com>
Tue, 28 Jun 2022 16:07:23 +0000 (09:07 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 28 Jun 2022 16:33:33 +0000 (09:33 -0700)
commit3706bdad4ae0fe91fbb8bb3e0acc88cf6b13ce56
tree9291fdd3cb25aae3c877e9cef02885b7aae5afff
parenta2095d1aff847ab7f7035744fb718c32cf680a01
[X86] Remove unnecessary COPY from EmitLoweredCascadedSelect.

I believe we already checked that the destination of the first
CMOV is only used by the second CMOV so I don't think there is any
reason we need the PHI to write the register that was used by the
first CMOV. We can directly use the second CMOV destination and
avoid the copy.

This may be a left over from when the cascaded select handling
was part of the main algorithm before it was refactored in D35685.

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D128124
llvm/lib/Target/X86/X86ISelLowering.cpp