mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[PowerPC] Fix transform in table gen file causing UB
Running a bootstrap build with UBSan produces a number of instances where we have signed integer overflow due to this transform. Change the type to long to prevent this UB on 64-bit build machines. llvm-svn: 325347
This commit is contained in:
parent
58cf9fd581
commit
4b9921cbbe
@ -308,7 +308,7 @@ def HI16 : SDNodeXForm<imm, [{
|
||||
|
||||
def HA16 : SDNodeXForm<imm, [{
|
||||
// Transformation function: shift the immediate value down into the low bits.
|
||||
int Val = N->getZExtValue();
|
||||
long Val = N->getZExtValue();
|
||||
return getI32Imm((Val - (signed short)Val) >> 16, SDLoc(N));
|
||||
}]>;
|
||||
def MB : SDNodeXForm<imm, [{
|
||||
|
Loading…
Reference in New Issue
Block a user