diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-03-25 06:12:06 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-03-25 06:12:06 +0000 |
| commit | 2771e2c9602df0f3e296e18500b9079b21dea98c (patch) | |
| tree | d804165da20af06ce2ca81d8819541c92f83eeff /llvm/lib/Target/PowerPC/PPCISelLowering.h | |
| parent | 5359171003ad6aac509748e4bb04ed683bb12aa4 (diff) | |
| download | bcm5719-llvm-2771e2c9602df0f3e296e18500b9079b21dea98c.tar.gz bcm5719-llvm-2771e2c9602df0f3e296e18500b9079b21dea98c.zip | |
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}.
llvm-svn: 27106
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.h')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.h b/llvm/lib/Target/PowerPC/PPCISelLowering.h index 5482e9aa5c0..eeab53df009 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.h +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.h @@ -105,6 +105,11 @@ namespace llvm { /// 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 { |

