[PATCH] D33940: [Power9] Added support for the modsw, moduw, modsd, modud hardware instructions that are new to P9.
Tony Jiang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 8 11:08:19 PDT 2017
jtony added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:207
- // PowerPC has no SREM/UREM instructions
- setOperationAction(ISD::SREM, MVT::i32, Expand);
- setOperationAction(ISD::UREM, MVT::i32, Expand);
- setOperationAction(ISD::SREM, MVT::i64, Expand);
- setOperationAction(ISD::UREM, MVT::i64, Expand);
+ // PowerPC has no SREM/UREM instructions unless we are on P9
+ // On P9 we may use a harware instruction to compute the remainder.
----------------
SREM/UREM are actually not instructions, they are SDNode or operations, I think.
================
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]
----------------
Do we need to test Big-endian also?
https://reviews.llvm.org/D33940
More information about the llvm-commits
mailing list