[RISCV] Legalize select when Zbt extension available
authorMichael Munday <mike.munday@lowrisc.org>
Tue, 12 Jan 2021 21:22:34 +0000 (21:22 +0000)
committerSam Elliott <selliott@lowrisc.org>
Tue, 12 Jan 2021 21:24:38 +0000 (21:24 +0000)
commit71ed4b6ce57d8843ef705af8f98305976a8f107a
treed7b9849d0879ac3403f2ebeb5ef2a8caa5850007
parente15f3ddcae65525176d1f152effb88cd3c6441a3
[RISCV] Legalize select when Zbt extension available

The custom expansion of select operations in the RISC-V backend
interferes with the matching of cmov instructions. Legalizing
select when the Zbt extension is available solves that problem.

Reviewed By: lenary, craig.topper

Differential Revision: https://reviews.llvm.org/D93767
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32Zbb.ll
llvm/test/CodeGen/RISCV/rv32Zbbp.ll
llvm/test/CodeGen/RISCV/rv32Zbs.ll
llvm/test/CodeGen/RISCV/rv32Zbt.ll
llvm/test/CodeGen/RISCV/rv64Zbt.ll