HomePhabricator

[X86] combineX86GatherScatter - only fold scale if the index isn't extended

Authored by RKSimon on Oct 29 2021, 3:47 AM.

Description

[X86] combineX86GatherScatter - only fold scale if the index isn't extended

As mentioned on D108539, when the gather indices are smaller than the pointer size, they are sign-extended BEFORE scale is applied, making the general fold unsafe.

If the index have sufficient sign-bits then folding the scale could be safe - I'll investigate this.

Details

Committed
RKSimonOct 29 2021, 3:48 AM
Parents
rG96808c69a13c: [ASTImporter] Remove redundant IsStructuralMatch overloads
Branches
Unknown
Tags
Unknown