[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 27 00:38:03 PDT 2024
================
@@ -792,17 +792,18 @@ let Predicates = [HasVendorXCValu, IsRV32], AddedComplexity = 1 in {
def : Pat<(sext_inreg (XLenVT GPR:$rs1), i16), (CV_EXTHS GPR:$rs1)>;
def : Pat<(sext_inreg (XLenVT GPR:$rs1), i8), (CV_EXTBS GPR:$rs1)>;
def : Pat<(and (XLenVT GPR:$rs1), 0xffff), (CV_EXTHZ GPR:$rs1)>;
+ def : Pat<(and (XLenVT GPR:$rs1), 0xff), (CV_EXTBZ GPR:$rs1)>;
----------------
realqhc wrote:
I'm sorry for the late reply. I have raised the question to openhardware group and the answer is, for CV32E40P extension enabled CPUs,`cv.extbz` should replace `andi` when possible, but the performance comparison is not available right now.
https://github.com/llvm/llvm-project/pull/100684
More information about the cfe-commits
mailing list