[all-commits] [llvm/llvm-project] bb3f99: [llvm-reduce] Fix crash when reducing integer vect...

Fraser Cormack via All-commits all-commits at lists.llvm.org
Wed Jul 13 09:08:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb3f99cd858e5a769f82c609f1536b1a00dcdcaf
      https://github.com/llvm/llvm-project/commit/bb3f99cd858e5a769f82c609f1536b1a00dcdcaf
  Author: Fraser Cormack <fraser at codeplay.com>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    A llvm/test/tools/llvm-reduce/reduce-operands-fp.ll
    A llvm/test/tools/llvm-reduce/reduce-operands-int.ll
    A llvm/test/tools/llvm-reduce/reduce-operands.ll
    R llvm/test/tools/llvm-reduce/remove-operands-fp.ll
    R llvm/test/tools/llvm-reduce/remove-operands.ll
    M llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp

  Log Message:
  -----------
  [llvm-reduce] Fix crash when reducing integer vectors to 1

Integer vectors were previously ignored when reducing operands. When
6b8bd0f72 introduced support for reducing floating-point
scalars/vectors, the vector case was written to only handle
floating-point values. It would crash when creating an invalid
ConstantFP from the integer element type.

Instead of reinstating the old integer vector behaviour, we might as
well reduce integer vectors to all-one splats.

A couple of existing tests has also been renamed from "remove" to
"reduce" to better reflect the deltas they test.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D129629




More information about the All-commits mailing list