[all-commits] [llvm/llvm-project] 6b1ea2: [llvm-stress] Support scalable vectors and out of ...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Dec 13 07:47:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b1ea24c265205190d3e73b08ed76e85988d76f5
      https://github.com/llvm/llvm-project/commit/6b1ea24c265205190d3e73b08ed76e85988d76f5
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/tools/llvm-stress/llvm-stress.cpp

  Log Message:
  -----------
  [llvm-stress] Support scalable vectors and out of bounds indices to vector ops

This change does two things.

First, it supports scalable vectors in llvm-stress output.  There's an off-by-default flag -enable-scalable-vectors which generates a scalable vector with 50% probability when a random vector type is selected.  Because of the existing implementation, this tends to skew an entire test towards either scalable or fixed since we most select initial values, not random types.

Second, it selects a random value for the index of an insertelement or extractelement.  As a result, out of bounds indices can not appear for fixed lengh vectors.  Previously, it chose a random constant which was, by construction, in range.




More information about the All-commits mailing list