[PATCH] D91646: [VE] VEC_BROADCAST, lowering and isel

Kazushi Marukawa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 03:31:07 PST 2020


kaz7 added inline comments.


================
Comment at: llvm/lib/Target/VE/VEISelLowering.cpp:1394
+    auto EC = ElementCount::getFixed(256);
+    MVT LegalResVT = MVT::getVectorVT(ElemVT, EC);
+
----------------
Doesn't NumEls work instead of EC?


================
Comment at: llvm/lib/Target/VE/VEInstrPatternsVec.td:36
+            (VBRDrl f64:$sy, i32:$vl)>;
+}
+
----------------
You can use simm7 or simm7fp here to generate VBRDil directly.


================
Comment at: llvm/test/CodeGen/VE/Vector/vec_broadcast.ll:2
+; RUN: llc < %s -mtriple=ve-unknown-unknown -mattr=+vpu | FileCheck %s
+
+define fastcc <256 x i64> @brdv256i64(i64 %s) {
----------------
Better to add more test like using not only integer variables but also integer/float immediate values and few more test which is not working atm but may work in the future, e.g. 128 length vector and char 256 length vector.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91646



More information about the llvm-commits mailing list