Codegen things like:
<int -1, int -1, int -1, int -1>
and
<int 65537, int 65537, int 65537, int 65537>
Using things like:
vspltisb v0, -1
and:
vspltish v0, 1
instead of using constant pool loads.
This implements CodeGen/PowerPC/vec_splat.ll:splat_imm_i{32|16}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27106 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h
index 5482e9a..eeab53d 100644
--- a/lib/Target/PowerPC/PPCISelLowering.h
+++ b/lib/Target/PowerPC/PPCISelLowering.h
@@ -105,6 +105,11 @@
/// isZeroVector - Return true if this build_vector is an all-zero vector.
///
bool isZeroVector(SDNode *N);
+
+ /// isVecSplatImm - Return true if this is a build_vector of constants which
+ /// can be formed by using a vspltis[bhw] instruction. The ByteSize field
+ /// indicates the number of bytes of each element [124] -> [bhw].
+ bool isVecSplatImm(SDNode *N, unsigned ByteSize, char *Val = 0);
}
class PPCTargetLowering : public TargetLowering {