This is an archive of the discontinued LLVM Phabricator instance.

[ConstantFolding] Fix bitcast vector of i1
ClosedPublic

Authored by igorb on Jun 26 2016, 6:57 AM.

Details

Summary

[ConstantFolding] Fix bitcast vector of i1.
StoreSizeInBytes of i1 is 8,so current implementation return incorrect result.
For example: bitcast <8 x i1> <i1 true, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true> to i8
converted to i8 1

Diff Detail

Repository
rL LLVM

Event Timeline

igorb updated this revision to Diff 61911.Jun 26 2016, 6:57 AM
igorb retitled this revision from to [ConstantFolding] Fix bitcast vector of i1.
igorb updated this object.
igorb added reviewers: craig.topper, majnemer, delena.
igorb set the repository for this revision to rL LLVM.
igorb added a subscriber: llvm-commits.
majnemer accepted this revision.Jun 26 2016, 2:07 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 26 2016, 2:07 PM
This revision was automatically updated to reflect the committed changes.