[llvm] r174230 - LLVM enablement for some older PowerPC CPUs

Hal Finkel hfinkel at anl.gov
Fri Feb 1 15:28:56 PST 2013


----- Original Message -----
> From: "Bill Schmidt" <wschmidt at linux.vnet.ibm.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Friday, February 1, 2013 4:59:52 PM
> Subject: [llvm] r174230 - LLVM enablement for some older PowerPC CPUs
> 
> Author: wschmidt
> Date: Fri Feb  1 16:59:51 2013
> New Revision: 174230
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=174230&view=rev
> Log:
> LLVM enablement for some older PowerPC CPUs

Bill, you need to update this list as well:

void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) {
  static const char *const CPUDirectives[] = {
    "",
    "ppc",
    "ppc440",
    "ppc601",
    "ppc602",
    "ppc603",
    "ppc7400",
    "ppc750",
    "ppc970",
    "ppcA2",
    "ppce500mc",
    "ppce5500",
    "power6",
    "power7",
    "ppc64"
  };

 -Hal

> 
> Added:
>     llvm/trunk/test/CodeGen/PowerPC/pwr3-6x.ll
> Modified:
>     llvm/trunk/lib/Target/PowerPC/PPC.td
>     llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
> 
> Modified: llvm/trunk/lib/Target/PowerPC/PPC.td
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPC.td?rev=174230&r1=174229&r2=174230&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPC.td (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPC.td Fri Feb  1 16:59:51 2013
> @@ -39,7 +39,12 @@ def DirectiveE500mc : SubtargetFeature<"
>                                         "PPC::DIR_E500mc", "">;
>  def DirectiveE5500  : SubtargetFeature<"", "DarwinDirective",
>                                         "PPC::DIR_E5500", "">;
> +def DirectivePwr3: SubtargetFeature<"", "DarwinDirective",
> "PPC::DIR_PWR3", "">;
> +def DirectivePwr4: SubtargetFeature<"", "DarwinDirective",
> "PPC::DIR_PWR4", "">;
> +def DirectivePwr5: SubtargetFeature<"", "DarwinDirective",
> "PPC::DIR_PWR5", "">;
> +def DirectivePwr5x: SubtargetFeature<"", "DarwinDirective",
> "PPC::DIR_PWR5X", "">;
>  def DirectivePwr6: SubtargetFeature<"", "DarwinDirective",
>  "PPC::DIR_PWR6", "">;
> +def DirectivePwr6x: SubtargetFeature<"", "DarwinDirective",
> "PPC::DIR_PWR6X", "">;
>  def DirectivePwr7: SubtargetFeature<"", "DarwinDirective",
>  "PPC::DIR_PWR7", "">;
>  
>  def Feature64Bit     : SubtargetFeature<"64bit","Has64BitSupport",
>  "true",
> @@ -116,10 +121,25 @@ def : Processor<"a2q", PPCA2Itineraries,
>                                            FeatureSTFIWX,
>                                            FeatureISEL,
>                                            Feature64Bit /*,
>                                            Feature64BitRegs */,
>                                            FeatureQPX]>;
> +def : Processor<"pwr3", G5Itineraries,
> +                  [DirectivePwr3, FeatureAltivec, FeatureMFOCRF,
> +                   FeatureSTFIWX, Feature64Bit]>;
> +def : Processor<"pwr4", G5Itineraries,
> +                  [DirectivePwr4, FeatureAltivec, FeatureMFOCRF,
> +                   FeatureFSqrt, FeatureSTFIWX, Feature64Bit]>;
> +def : Processor<"pwr5", G5Itineraries,
> +                  [DirectivePwr5, FeatureAltivec, FeatureMFOCRF,
> +                   FeatureFSqrt, FeatureSTFIWX, Feature64Bit]>;
> +def : Processor<"pwr5x", G5Itineraries,
> +                  [DirectivePwr5x, FeatureAltivec, FeatureMFOCRF,
> +                   FeatureFSqrt, FeatureSTFIWX, Feature64Bit]>;
>  def : Processor<"pwr6", G5Itineraries,
>                    [DirectivePwr6, FeatureAltivec,
>                     FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX,
>                     Feature64Bit /*, Feature64BitRegs */]>;
> +def : Processor<"pwr6x", G5Itineraries,
> +                  [DirectivePwr5x, FeatureAltivec, FeatureMFOCRF,
> +                   FeatureFSqrt, FeatureSTFIWX, Feature64Bit]>;
>  def : Processor<"pwr7", G5Itineraries,
>                    [DirectivePwr7, FeatureAltivec,
>                     FeatureMFOCRF, FeatureFSqrt, FeatureSTFIWX,
> 
> Modified: llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h?rev=174230&r1=174229&r2=174230&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCSubtarget.h Fri Feb  1 16:59:51
> 2013
> @@ -43,7 +43,12 @@ namespace PPC {
>      DIR_A2,
>      DIR_E500mc,
>      DIR_E5500,
> +    DIR_PWR3,
> +    DIR_PWR4,
> +    DIR_PWR5,
> +    DIR_PWR5X,
>      DIR_PWR6,
> +    DIR_PWR6X,
>      DIR_PWR7,
>      DIR_64
>    };
> 
> Added: llvm/trunk/test/CodeGen/PowerPC/pwr3-6x.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/pwr3-6x.ll?rev=174230&view=auto
> ==============================================================================
> --- llvm/trunk/test/CodeGen/PowerPC/pwr3-6x.ll (added)
> +++ llvm/trunk/test/CodeGen/PowerPC/pwr3-6x.ll Fri Feb  1 16:59:51
> 2013
> @@ -0,0 +1,14 @@
> +; Test basic support for some older processors.
> +
> +;RUN: llc < %s -march=ppc64 -mcpu=pwr3 | FileCheck %s
> +;RUN: llc < %s -march=ppc64 -mcpu=pwr4 | FileCheck %s
> +;RUN: llc < %s -march=ppc64 -mcpu=pwr5 | FileCheck %s
> +;RUN: llc < %s -march=ppc64 -mcpu=pwr5x | FileCheck %s
> +;RUN: llc < %s -march=ppc64 -mcpu=pwr6x | FileCheck %s
> +
> +define void @foo() {
> +entry:
> +  ret void
> +}
> +
> +; CHECK: @foo
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list