[PATCH] D105501: [PowerPC] Power ISA features for Semachecking

Quinn Pham via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 6 10:23:00 PDT 2021


quinnp created this revision.
Herald added subscribers: shchenz, kbarton, nemanjai.
quinnp requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

[NFC] This patch adds features for pwr7, pwr8, and pwr9 that can be
used for semacheking builtin functions that are only valid for certain
versions of ppc.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105501

Files:
  clang/lib/Basic/Targets/PPC.cpp


Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -422,6 +422,14 @@
     return false;
   }
 
+  Features["isa207"] = llvm::StringSwitch<bool>(CPU)
+                           .Case("pwr9", true)
+                           .Case("ppc64le", true)
+                           .Case("pwr8", true)
+                           .Default(false);
+  Features["isa30"] =
+      llvm::StringSwitch<bool>(CPU).Case("pwr9", true).Default(false);
+
   return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec);
 }
 
@@ -434,6 +442,7 @@
   Features["power10-vector"] = true;
   Features["pcrelative-memops"] = true;
   Features["prefix-instrs"] = true;
+  Features["isa31"] = true;
   return;
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105501.356771.patch
Type: text/x-patch
Size: 828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210706/f4e5d3bb/attachment-0001.bin>


More information about the cfe-commits mailing list