HomePhabricator

[InstCombine] Support vectors in SimplifyAddWithRemainder.

Authored by fhahn on Mar 10 2020, 7:22 AM.

Description

[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

Details

Committed
fhahnMar 10 2020, 7:29 AM
Reviewer
spatel
Differential Revision
D75906: [InstCombine] Support vectors in SimplifyAddWithRemainder.
Parents
rG714466bf367d: Revert "[clang-tidy] New check: bugprone-suspicious-include"
Branches
Unknown
Tags
Unknown