Page MenuHomePhabricator

[SelectionDAG] Don't pass on DemandedElts when handling SCALAR_TO_VECTOR
ClosedPublic

Authored by pendingchaos on Mon, Dec 3, 8:01 AM.

Details

Summary

Fixes an assertion:

llc: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:2200: llvm::KnownBits llvm::SelectionDAG::computeKnownBits(llvm::SDValue, const llvm::APInt&, unsigned int) const: Assertion `(!Op.getValueType().isVector() || NumElts == Op.getValueType().getVectorNumElements()) && "Unexpected vector size"' failed.

Diff Detail

Repository
rL LLVM

Event Timeline

pendingchaos created this revision.Mon, Dec 3, 8:01 AM
RKSimon added inline comments.Mon, Dec 3, 8:09 AM
test/CodeGen/AMDGPU/computeKnownBits-scalar-to-vector-crash.ll
1 ↗(On Diff #176410)

Even though this is a crash test its probably worth adding at least some basic FileCheck CHECKS (or just run update_llc_test_checks)

Makes the test case use FileCheck.

I don't have commit access.

pendingchaos marked an inline comment as done.Thu, Dec 6, 8:32 AM
RKSimon accepted this revision.Thu, Dec 6, 9:52 AM

LGTM - I'll commit shortly but please make sure you've requested commit access

This revision is now accepted and ready to land.Thu, Dec 6, 9:52 AM
This revision was automatically updated to reflect the committed changes.