[all-commits] [llvm/llvm-project] 16cd34: [RISCV] Fix collectNonISAExtFeature returning nega...
Luke Lau via All-commits
all-commits at lists.llvm.org
Mon Jan 8 07:12:08 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 16cd344380aa89a4bc47939ae65fd59fe8c77181
https://github.com/llvm/llvm-project/commit/16cd344380aa89a4bc47939ae65fd59fe8c77181
Author: Luke Lau <luke at igalia.com>
Date: 2024-01-08 (Mon, 08 Jan 2024)
Changed paths:
M clang/lib/Basic/Targets/RISCV.cpp
M clang/test/CodeGen/RISCV/riscv-func-attr-target.c
Log Message:
-----------
[RISCV] Fix collectNonISAExtFeature returning negative extension features (#76962)
collectNonISAExtFeature was returning any negative extension features,
e.g.
given an input of
+zifencei,+m,+a,+save-restore,-zbb,-relax,-zfa
It would return
+save-restore,-zbb,-relax,-zfa
Because negative extensions aren't emitted when calling
toFeatureVector(), and
so were considered missing. Hence why we still see "-zfa" and "-zfb" in
the tests for
the full arch string attributes, even though with a full arch string we
should be overriding the extensions.
This fixes it by using RISCVISAInfo::isSupportedExtensionFeature instead
to
check if a feature is an ISA extension.
More information about the All-commits
mailing list