[PATCH] D55274: [DagCombiner][X86] Simplify a ConcatVectors of a scalar_to_vector with undef.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 07:58:34 PST 2018


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


================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:16512
+  if (!LegalOperations && Scalar.getOpcode() == ISD::SCALAR_TO_VECTOR &&
+      Scalar.hasOneUse()) {
+    // concat_vector( bitcast (scalar_to_vector %A), UNDEF) -->
----------------
RKSimon wrote:
> check for implicit truncation of the scalar value
Right. I will add that check.


================
Comment at: test/CodeGen/X86/combine-concatvectors.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx < %s | FileCheck %s
+
----------------
RKSimon wrote:
> Please commit this with trunk's current codegen and rebase so we see the diff
Will do.


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

https://reviews.llvm.org/D55274





More information about the llvm-commits mailing list