HomePhabricator

[SelectionDAG] Compute known bits of CopyFromReg

Authored by piotr on Apr 5 2019, 12:44 AM.

Description

[SelectionDAG] Compute known bits of CopyFromReg

Summary:
Teach SelectionDAG how to compute known bits of ISD::CopyFromReg if
the virtual reg used has one def only.

This can be particularly useful when calling isBaseWithConstantOffset()
with the ISD::CopyFromReg argument, as more optimizations may get enabled
in the result.

Also add a missing truncation on X86, found by testing of this patch.

Change-Id: Id1c9fceec862d118c54a5b53adf72ada5d6daefa

Reviewers: bogner, craig.topper, RKSimon

Reviewed By: RKSimon

Subscribers: lebedev.ri, nemanjai, jvesely, nhaehnle, javed.absar, jsji, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59535

llvm-svn: 357745

Details

Committed
piotrApr 5 2019, 12:44 AM
Reviewer
RKSimon
Differential Revision
D59535: [SelectionDAG] Compute known bits of CopyFromReg
Parents
rG94cd06676349: PDBFPO: Use references instead of pointers, where possible
Branches
Unknown
Tags
Unknown