HomePhabricator

[LegalizeDAG] Use getMemBasePlusOffset to simplify some code. Use other…

Authored by craig.topper on Sat, May 16, 1:02 AM.

Description

[LegalizeDAG] Use getMemBasePlusOffset to simplify some code. Use other signature of getMemBasePlusOffset in another location. NFCI

The code was calculating an offset from a stack pointer SDValue.
This is exactly what getMemBasePlusOffset does. I also replaced
sizeof(int) with a hardcoded 4. We know the type we're operating
on is 4 bytes. But the size of int that the source code is being
compiled with isn't guaranteed to be 4 bytes.

While here replace another use of getMemBasePlusOffset that was
proceeded with a call to getConstant with the other signature
that call getConstant internally.

Details

Committed
craig.topperSat, May 16, 1:02 AM
Parents
rG45c7b3fd9109: [LegalizeVectorTypes] Remove non-constnat INSERT_SUBVECTOR handling. NFC
Branches
Unknown
Tags
Unknown