[all-commits] [llvm/llvm-project] c8c14d: [InstCombine] Support vectors in SimplifyAddWithRe...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Mar 10 07:30:28 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c8c14d979abc417d24081cc96c46a2844ce192c2
      https://github.com/llvm/llvm-project/commit/c8c14d979abc417d24081cc96c46a2844ce192c2
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-03-10 (Tue, 10 Mar 2020)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
    M llvm/test/Transforms/InstCombine/add4.ll

  Log Message:
  -----------
  [InstCombine] Support vectors in SimplifyAddWithRemainder.

SimplifyAddWithRemainder currently also matches for vector types, but
tries to create an integer constant, which causes a crash.

By using Constant::getIntegerValue() we can support both the scalar and
vector cases.

The 2 added test cases crash without the fix.

Reviewers: spatel, lebedev.ri

Reviewed By: spatel, lebedev.ri

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




More information about the All-commits mailing list