OSDN Git Service

[CGP] Ensure address scaled offset is representable as int64_t
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 29 May 2020 11:25:27 +0000 (12:25 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 29 May 2020 11:25:43 +0000 (12:25 +0100)
commitb9826c10866997a8869a7356a37aade759338b08
treea67fc811976c33d256a741d47e315b468520454a
parent1f4ba66ecc877562e75059e32d4c95a67e1fd483
[CGP] Ensure address scaled offset is representable as int64_t

AddressingModeMatcher::matchScaledValue was calling getSExtValue for a constant before ensuring that we can actually represent the value as int64_t

Fixes OSSFuzz#22723 which is a followup to rGc479052a74b2 (PR46004 / OSSFuzz#22357)
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/X86/pr46004.ll