This is an archive of the discontinued LLVM Phabricator instance.

DAG: Fold out out of bounds insert_vector_elt
ClosedPublic

Authored by arsenm on Dec 1 2016, 10:16 PM.

Details

Summary

getNode already prevents formation of out of bounds constant
extract_vector_elts. Do the same for insert_vector_elt.

As came up in D26174

Diff Detail

Event Timeline

arsenm updated this revision to Diff 80029.Dec 1 2016, 10:16 PM
arsenm retitled this revision from to DAG: Fold out out of bounds insert_vector_elt.
arsenm updated this object.
arsenm added reviewers: efriedma, bogner.
arsenm added a subscriber: llvm-commits.
efriedma accepted this revision.Dec 2 2016, 10:16 AM
efriedma edited edge metadata.

LGTM with the PPC test fixed.

test/CodeGen/PowerPC/vec_add_sub_quadword.ll
34

Please fix to generate vadduqm.

57

Can you fix this test so it still generates a vsubuqm? Just make the subtract take tmpvec as input instead of tmpvec2.

This revision is now accepted and ready to land.Dec 2 2016, 10:16 AM
efriedma requested changes to this revision.Dec 2 2016, 10:17 AM
efriedma edited edge metadata.

Oh, wait, actually we should have a test which explicits checks that we fold the insertelement to undef.

This revision now requires changes to proceed.Dec 2 2016, 10:17 AM
arsenm updated this revision to Diff 80182.Dec 3 2016, 10:45 AM
arsenm edited edge metadata.

Fix test

hfinkel accepted this revision.Dec 3 2016, 1:56 PM
hfinkel added a reviewer: hfinkel.
hfinkel added a subscriber: hfinkel.

LGTM

efriedma accepted this revision.Dec 9 2016, 11:00 AM
efriedma edited edge metadata.
This revision is now accepted and ready to land.Dec 9 2016, 11:00 AM
efriedma closed this revision.Dec 9 2016, 11:00 AM