[PATCH] D151867: [Clang][RISCV] Make generic clz/ctz builtins defined for zero on RISCV targets.

Yunze Zhu(Thead) via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 00:09:09 PDT 2023


Yunzezhu updated this revision to Diff 528698.
Yunzezhu added a comment.

I made the flag isCLZForZeroUndef set to false only when target support extension zbb or xtheadbb, and this will prevent making codegen worse when target does not support abb or xtheadbb.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151867/new/

https://reviews.llvm.org/D151867

Files:
  clang/lib/Basic/Targets/RISCV.h
  clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-xtheadbb.c
  clang/test/CodeGen/RISCV/rvb-intrinsics/riscv32-zbb.c
  clang/test/CodeGen/RISCV/rvb-intrinsics/riscv64-xtheadbb.c
  clang/test/CodeGen/RISCV/rvb-intrinsics/riscv64-zbb.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151867.528698.patch
Type: text/x-patch
Size: 8165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230606/ab835e67/attachment.bin>


More information about the cfe-commits mailing list