[PATCH] D59883: Lower generic MASSV entries to PowerPC subtarget-specific entries

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 15:00:25 PDT 2019


jsji added a comment.

Why we need a new pass to do this simple lowering? 
Why can't we do it similar to `InitLibcalls` and change the suffixes for subtarget using `setLibcallName`?



================
Comment at: llvm/test/CodeGen/PowerPC/lower-massv.ll:1
+; RUN: llc -mcpu=pwr9 < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix CHECK-PWR9 -check-prefix CHECK-ALL %s 
+; RUN: llc -mcpu=pwr8 < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix CHECK-PWR8 -check-prefix CHECK-ALL %s 
----------------
You can use `-check-prefixes=CHECK-PWR9,CHECK` instead of two `-check-prefix`


================
Comment at: llvm/test/CodeGen/PowerPC/lower-massv.ll:2
+; RUN: llc -mcpu=pwr9 < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix CHECK-PWR9 -check-prefix CHECK-ALL %s 
+; RUN: llc -mcpu=pwr8 < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix CHECK-PWR8 -check-prefix CHECK-ALL %s 
+; RUN: llc -mcpu=pwr8 < %s -mtriple=powerpc64le-unknown-linux-gnu | FileCheck -check-prefix CHECK-DFLT -check-prefix CHECK-ALL %s 
----------------
Add `-verify-machineinstrs` to all RUN lines please.


================
Comment at: llvm/test/CodeGen/PowerPC/lower-massv.ll:6
+target datalayout = "e-m:e-i64:64-n32:64"
+target triple = "powerpc64le-unknown-linux-gnu"
+
----------------
Remove 'datalyout` and `triple`, we use triple in RUN line now.


================
Comment at: llvm/test/CodeGen/PowerPC/lower-massv.ll:77
+
+; cbrt without the power9-vector attribute on the caller
+; check massv calls are correctly targeted for Power8
----------------
We normally don't rely on function attribute to distinguish test.
Can we test them in different RUN lint with different `-mattr`?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59883/new/

https://reviews.llvm.org/D59883





More information about the llvm-commits mailing list