Page MenuHomePhabricator

Fix failure of InstCombine to propagate fast math flags when scalarizing vector arithmetic.
ClosedPublic

Authored by resistor on Feb 24 2016, 4:09 PM.

Details

Reviewers
arsenm
hfinkel
Summary

Most portions of InstCombine properly propagate fast math flags, but apparently the vector secularization section was overlooked.

Diff Detail

Event Timeline

resistor updated this revision to Diff 48988.Feb 24 2016, 4:09 PM
resistor retitled this revision from to Fix failure of InstCombine to propagate fast math flags when scalarizing vector arithmetic..
resistor updated this object.
resistor added a reviewer: hfinkel.
resistor set the repository for this revision to rL LLVM.
resistor added a subscriber: llvm-commits.
arsenm added inline comments.Feb 26 2016, 9:49 AM
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
108–110

Should a BinaryOperator::CreateWithFlags be added? It already has CreateNSW etc.

resistor added inline comments.Feb 26 2016, 11:05 AM
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
108–110

It would have to be something like BinaryOperator::CreateWithCopiedFlags, because there's not simple "give me all the flags" methods exposed on BinaryOperator. Seems a little awkward, but maybe it's still better?

arsenm added inline comments.Feb 26 2016, 4:40 PM
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
108–110

Probably. It seems like a mess to have all of these separate copies everywhere this is needed

resistor updated this revision to Diff 49309.Feb 27 2016, 10:32 PM
resistor removed rL LLVM as the repository for this revision.

Added new CreateWithCopiedFlags() on BinaryOperator.

hfinkel accepted this revision.Mar 1 2016, 11:31 AM
hfinkel edited edge metadata.

LGTM

This revision is now accepted and ready to land.Mar 1 2016, 11:31 AM
resistor closed this revision.Mar 1 2016, 11:41 AM

r262376