[PATCH] D65529: [PowerPC] Use xxleqv to set all one vector IMM(-1).

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 06:31:03 PDT 2019


jsji marked 2 inline comments as done.
jsji added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrVSX.td:1298
+  
+  def : Pat<(v4i32 (bitconvert (v16i8 immAllOnesV))),
+            (XXLEQVOnes)>;
----------------
wuzish wrote:
> Has immAllOnesV contained bitcast semantic? It's equal to ISD::isBuildVectorAllOnes.
No, it doesn't.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrVSX.td:4079
               (v16i8 (COPY_TO_REGCLASS (XXSPLTIB imm:$A), VSRC))>;
-    def : Pat<(v16i8 immAllOnesV),
-              (v16i8 (COPY_TO_REGCLASS (XXSPLTIB 255), VSRC))>;
----------------
wuzish wrote:
> If we don't enum all the type, just use v4i32 version. Are other types bitcast/canonical into v4i32 automatically?
We will canonize `isBuildVectorAllOnes` into v16i8, we don't need to enum all types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65529/new/

https://reviews.llvm.org/D65529





More information about the llvm-commits mailing list