[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)
commit991834a51616799456a5e65cefde2f41c350aca2
tree2d3ed7e2609e250005b9af9d51ff74d1dc5b3386
parent8616a7702636b17deebf182146a84d3f2458b94d
[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

llvm-svn: 368437
llvm/lib/Transforms/IPO/GlobalOpt.cpp
llvm/test/Transforms/GlobalOpt/large-int-crash.ll [new file with mode: 0644]