We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24ea16f commit 90558aeCopy full SHA for 90558ae
core/iwasm/aot/aot_intrinsic.c
@@ -898,6 +898,15 @@ aot_intrinsic_fill_capability_flags(AOTCompContext *comp_ctx)
898
if (!strncmp(comp_ctx->target_arch, "riscv32", 7)) {
899
add_i64_common_intrinsics(comp_ctx);
900
}
901
+ /*
902
+ * LLVM 16 and later expands cttz intrinsic to a table lookup,
903
+ * which involves relocations. (unless ZBB is available.)
904
+ * https://reviews.llvm.org/D128911
905
+ */
906
+#if LLVM_VERSION_MAJOR >= 16
907
+ add_intrinsic_capability(comp_ctx, AOT_INTRINSIC_FLAG_I32_CTZ);
908
+ add_intrinsic_capability(comp_ctx, AOT_INTRINSIC_FLAG_I64_CTZ);
909
+#endif
910
911
else if (!strncmp(comp_ctx->target_arch, "xtensa", 6)) {
912
/*
0 commit comments