1. Jun 22, 2023
  2. Jun 21, 2023
    • Craig Topper's avatar
      [RISCV] Use a build_vector instead of a chain insert_vector_elts for vXi1 build_vector lowreing. · aae155c5
      Craig Topper authored
      A build_vector is the canonical representation rather than multiple
      insert_vector_elts.
      
      Unfortunately, this regresses quite a few tests now primarily due to not
      having a vmv.s.x special case, but I hope we can improve this with future
      patches.
      
      Stress testing in our downstream found an infinite loop in DAG combine.
      This patch breaks the infinite loop.
      
      The insert_vector_element chain starts with a fixed vector undef.
      Fixed vector undef is currently expanded to a build_vector of 0s
      which gets lowered to a vmv.v.i. The insert chain overwrites all
      elements so SimplifyDemandedVectorElts turns the vmv.v.i back into
      undef and the cycle repeats.
      
      We probably should custom lower fixed vector undef to scalable
      vector undef. I think that would also fix the infinite loop, but
      I didn't test that.
      
      Reviewed By: luke
      
      Differential Revision: https://reviews.llvm.org/D153399
      aae155c5
    • Fangrui Song's avatar
      [llvm-objdump][test] Add 2 symbols to adjust-vma.test · 7e334ac0
      Fangrui Song authored
      They will demonstrate some symbol that --adjust-vma= should not adjust.
      
      Reviewed By: jhenderson
      
      Differential Revision: https://reviews.llvm.org/D153401
      7e334ac0
    • Craig Topper's avatar
      [RISCV] Stop isInterleaveShuffle from producing illegal extract_subvectors. · ddf3f1b3
      Craig Topper authored
      The definition for ISD::EXTRACT_SUBVECTOR says the index must be
      aligned to the known minimum elements of the extracted type. We mostly
      got away with this but it turns out there are places that depend on this.
      
      For example, this code in getNode for ISD::EXTRACT_SUBVECTOR
      
      ```
          // EXTRACT_SUBVECTOR of CONCAT_VECTOR can be simplified if the pieces of
          // the concat have the same type as the extract.
          if (N1.getOpcode() == ISD::CONCAT_VECTORS && N1.getNumOperands() > 0 &&
              VT == N1.getOperand(0).getValueType()) {
            unsigned Factor = VT.getVectorMinNumElements();
            return N1.getOperand(N2C->getZExtValue() / Factor);
          }
      ```
      
      This depends on N2C->getZExtValue() being evenly divisible by Factor.
      
      Reviewed By: luke
      
      Differential Revision: https://reviews.llvm.org/D153380
      ddf3f1b3