[all-commits] [llvm/llvm-project] e7a9fd: [LV] Add test case for PR54427.

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Apr 25 05:38:40 PDT 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: e7a9fd4f57d6c51c2c97a545da6552c698eea347
      https://github.com/llvm/llvm-project/commit/e7a9fd4f57d6c51c2c97a545da6552c698eea347
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    A llvm/test/Transforms/LoopVectorize/induction-unroll-novec.ll

  Log Message:
  -----------
  [LV] Add test case for PR54427.

Reduced test for #54427.


  Commit: 0d2efbb8b82c13ea6e4aef727c5360eea6679605
      https://github.com/llvm/llvm-project/commit/0d2efbb8b82c13ea6e4aef727c5360eea6679605
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/test/Transforms/LoopVectorize/induction-unroll-novec.ll

  Log Message:
  -----------
  [LV] Always use add to add scalar iv and (startidx + step) for ints.

In the integer case, step will be negative and InductionOpCode will be
Sub for inductions counting down.

By using the InductionOpCode for integers, we would incorrectly subtract
a negative value, when it should be added instead.

This fixes #54427 on the 14.x branch.


Compare: https://github.com/llvm/llvm-project/compare/9a3e81e1f91f...0d2efbb8b82c


More information about the All-commits mailing list