[RISCV] Make ctlz/cttz cheap to speculatively execute so CodeGenPrepare won't insert...
authorCraig Topper <craig.topper@sifive.com>
Mon, 9 Nov 2020 18:05:51 +0000 (10:05 -0800)
committerCraig Topper <craig.topper@sifive.com>
Mon, 9 Nov 2020 18:13:45 +0000 (10:13 -0800)
commit5d3fd3df94e5463f8460fbc1a643e663b0e6cb2b
treeb4cc1dd706ca96052f6c0215ff6c09155459cb80
parenta59076006ba5b12acd1c602bfb67d4a92e17290c
[RISCV] Make ctlz/cttz cheap to speculatively execute so CodeGenPrepare won't insert a zero check.

Add additional isel patterns for ctzw/clzw instructions.

Differential Revision: https://reviews.llvm.org/D91040
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv32Zbb.ll
llvm/test/CodeGen/RISCV/rv64Zbb.ll