[PATCH] D14500: [MIPS] add overrides for isCheapToSpeculateCttz() and isCheapToSpeculateCtlz()
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 03:33:54 PST 2015
vkalintiris added a subscriber: vkalintiris.
vkalintiris added a comment.
Thank you for tackling this. I have only two minor comments.
================
Comment at: lib/Target/Mips/MipsISelLowering.h:238-244
@@ -237,1 +237,9 @@
+ bool isCheapToSpeculateCttz() const override {
+ return true;
+ }
+
+ bool isCheapToSpeculateCtlz() const override {
+ return true;
+ }
+
----------------
pre-MIPS32 ISAs don't have dedicated leading/trailing bit counting instructions. We should return true only if Subtarget.hasMips32() is true.
================
Comment at: test/Transforms/SimplifyCFG/Mips/cttz-ctlz.ll:1
@@ +1,2 @@
+; RUN: opt -S -simplifycfg -mtriple=mips < %s | FileCheck %s
+
----------------
Can you provide a full triple, eg. mips-linux-gnu?
http://reviews.llvm.org/D14500
More information about the llvm-commits
mailing list