[llvm] 2d5bfc6 - [Hexagon] Improve HVX version checks
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 17 07:41:28 PST 2020
Author: Krzysztof Parzyszek
Date: 2020-01-17T09:40:26-06:00
New Revision: 2d5bfc6eb15f28d87347aca95f05dfb25318d013
URL: https://github.com/llvm/llvm-project/commit/2d5bfc6eb15f28d87347aca95f05dfb25318d013
DIFF: https://github.com/llvm/llvm-project/commit/2d5bfc6eb15f28d87347aca95f05dfb25318d013.diff
LOG: [Hexagon] Improve HVX version checks
Added:
Modified:
llvm/lib/Target/Hexagon/Hexagon.td
llvm/lib/Target/Hexagon/HexagonSubtarget.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/Hexagon.td b/llvm/lib/Target/Hexagon/Hexagon.td
index 284b839fb57b..c8cddac88d68 100644
--- a/llvm/lib/Target/Hexagon/Hexagon.td
+++ b/llvm/lib/Target/Hexagon/Hexagon.td
@@ -85,13 +85,13 @@ def UseHVX128B : Predicate<"HST->useHVX128BOps()">,
AssemblerPredicate<"ExtensionHVX128B">;
def UseHVX : Predicate<"HST->useHVXOps()">,
AssemblerPredicate<"ExtensionHVXV60">;
-def UseHVXV60 : Predicate<"HST->useHVXOps()">,
+def UseHVXV60 : Predicate<"HST->useHVXV60Ops()">,
AssemblerPredicate<"ExtensionHVXV60">;
-def UseHVXV62 : Predicate<"HST->useHVXOps()">,
+def UseHVXV62 : Predicate<"HST->useHVXV62Ops()">,
AssemblerPredicate<"ExtensionHVXV62">;
-def UseHVXV65 : Predicate<"HST->useHVXOps()">,
+def UseHVXV65 : Predicate<"HST->useHVXV65Ops()">,
AssemblerPredicate<"ExtensionHVXV65">;
-def UseHVXV66 : Predicate<"HST->useHVXOps()">,
+def UseHVXV66 : Predicate<"HST->useHVXV66Ops()">,
AssemblerPredicate<"ExtensionHVXV66">;
def UseZReg : Predicate<"HST->useZRegOps()">,
AssemblerPredicate<"ExtensionZReg">;
diff --git a/llvm/lib/Target/Hexagon/HexagonSubtarget.h b/llvm/lib/Target/Hexagon/HexagonSubtarget.h
index 27606337c615..f81d668b3a1c 100644
--- a/llvm/lib/Target/Hexagon/HexagonSubtarget.h
+++ b/llvm/lib/Target/Hexagon/HexagonSubtarget.h
@@ -172,6 +172,18 @@ class HexagonSubtarget : public HexagonGenSubtargetInfo {
bool useHVXOps() const {
return HexagonHVXVersion > Hexagon::ArchEnum::NoArch;
}
+ bool useHVXV60Ops() const {
+ return HexagonHVXVersion >= Hexagon::ArchEnum::V60;
+ }
+ bool useHVXV62Ops() const {
+ return HexagonHVXVersion >= Hexagon::ArchEnum::V62;
+ }
+ bool useHVXV65Ops() const {
+ return HexagonHVXVersion >= Hexagon::ArchEnum::V65;
+ }
+ bool useHVXV66Ops() const {
+ return HexagonHVXVersion >= Hexagon::ArchEnum::V66;
+ }
bool useHVX128BOps() const { return useHVXOps() && UseHVX128BOps; }
bool useHVX64BOps() const { return useHVXOps() && UseHVX64BOps; }
More information about the llvm-commits
mailing list