OSDN Git Service

[ConstantFold] ExtractConstantBytes - handle shifts on large integer types
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 11 Apr 2019 16:39:31 +0000 (16:39 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 11 Apr 2019 16:39:31 +0000 (16:39 +0000)
commitce2b63cf709f6cd335508142fca4850b472f47e3
tree66cf8ef417a68230e210bff6fcd3f9cd7d2bcd8f
parentbc87fa30f7ff80db6e457e296e9ac2a8663b5381
[ConstantFold] ExtractConstantBytes - handle shifts on large integer types

Use APInt instead of getZExtValue from the ConstantInt until we can confirm that the shift amount is in range.

Reduced from OSS-Fuzz #14169 - https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14169

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358192 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/ConstantFold.cpp
test/Transforms/InstCombine/constant-fold-shifts.ll [new file with mode: 0644]