HomePhabricator

[PowerPC] Remove UB from PPCInstrInfo when handling rotates fed by constants

Authored by nemanjai on Mar 18 2020, 11:37 AM.

Description

[PowerPC] Remove UB from PPCInstrInfo when handling rotates fed by constants

As pointed out in https://bugs.llvm.org/show_bug.cgi?id=45232 this code can
end up shifting a 64-bit unsigned value left by 64 bits. Althought this works
as expected on some platforms it is definitely UB. This patch removes the UB
and adds the associated test case.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=45232

Details

Committed
nemanjaiMar 18 2020, 11:40 AM
Parents
rG746bd860c9c5: Replace get*Alignment() methods with get*Align() equivalents.
Branches
Unknown
Tags
Unknown