]> granicus.if.org Git - llvm/commit
[GlobalOpt] prevent crashing on large integer types (PR42932)
authorSanjay Patel <spatel@rotateright.com>
Fri, 9 Aug 2019 12:43:25 +0000 (12:43 +0000)
committerSanjay Patel <spatel@rotateright.com>
Fri, 9 Aug 2019 12:43:25 +0000 (12:43 +0000)
commit2ba7697899433e5980a7d298eda0e7d897d9e13c
treed92dfcc3be85867538652f8e65cfe87b7f3949fb
parent58a44f9905b126a4417724c1f794d762a77752bf
[GlobalOpt] prevent crashing on large integer types (PR42932)

This is a minimal fix (copy the predicate for the assert) to
prevent the crashing seen in:
https://bugs.llvm.org/show_bug.cgi?id=42932
...when converting a constant integer of arbitrary width to uint64_t.

Differential Revision: https://reviews.llvm.org/D65970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368437 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/large-int-crash.ll [new file with mode: 0644]