[coroutines] Get an IntegerType from the value instead of defaulting to 64 bit
authorNathan Lanza <nathan@lanza.io>
Mon, 25 Apr 2022 17:48:55 +0000 (10:48 -0700)
committerNathan Lanza <nathan@lanza.io>
Mon, 25 Apr 2022 18:10:46 +0000 (11:10 -0700)
commit950c95cfdd75a4a150148c9e0bc53f49b44e48bc
tree659ea097817811cb41cc22eb96365861a9a24587
parentef7439bdf923e59095449c3bc8cfe72d8101eea5
[coroutines] Get an IntegerType from the value instead of defaulting to 64 bit

This AliasPtr is being created always from an Int64 even for targets
where 32 bit is the proper type. e.g. “thumbv7-none-linux-android16”.
This causes the assert in the `get` func to fail as we're getting a 32
bit from the APInt.

Fix this by simply always just getting the type from the value instead.

Reviewed By: ChuanqiXu

Differential Revision: https://reviews.llvm.org/D123272
llvm/lib/Transforms/Coroutines/CoroFrame.cpp