OSDN Git Service

[LoopUnrollAnalyzer] Fix a bug in UnrolledInstAnalyzer::visitLoad.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Thu, 23 Jun 2016 14:31:31 +0000 (14:31 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Thu, 23 Jun 2016 14:31:31 +0000 (14:31 +0000)
commitb5514ec8c532758e8c224864dbe5f83dba9a6935
tree19295905db0ca669b957bc6efb8dcbbfe17fec85
parent85d254114e22337ea178c8e141b0692f97b28ec4
[LoopUnrollAnalyzer] Fix a bug in UnrolledInstAnalyzer::visitLoad.

When simplifying a load we need to make sure that the type of the
simplified value matches the type of the instruction we're processing.
In theory, we can handle casts here as we deal with constant data, but
since it's not implemented at the moment, we at least need to bail out.

This fixes PR28262.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273562 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LoopUnrollAnalyzer.cpp
test/Transforms/LoopUnroll/full-unroll-crashers.ll