[PATCH] D33940: [Power9] Added support for the modsw, moduw, modsd, modud hardware instructions that are new to P9.
Hiroshi Inoue via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 22:18:24 PDT 2017
inouehrs added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:208
+ // PowerPC has no SREM/UREM instructions unless we are on P9
+ // On P9 we may use a harware instruction to compute the remainder.
+ // The instructions are not legalized directly because in the cases where the
----------------
nit: harware -> hardware
================
Comment at: test/CodeGen/PowerPC/ppc64-P9-mod.ll:1
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 | FileCheck %s
+; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s -check-prefix=CHECK-PWR8 -implicit-check-not mod[us][wd]
----------------
nemanjai wrote:
> jtony wrote:
> > Do we need to test Big-endian also?
> Yes, I agree. The codegen (and therefore CHECK directives) don't need to change, but please add a RUN line with triple `-mtriple=powerpc64-unknown-linux-gnu`.
Also, it is better to add `-verify-machineinstrs`
https://reviews.llvm.org/D33940
More information about the llvm-commits
mailing list