mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[IndVars] Don't widen pointers in WidenIV::getWideRecurrence
It's not a reasonable transform, and calling getSignExtendExpr() on a pointer hits an assertion.
This commit is contained in:
parent
ac14d3966e
commit
9ec98f07d7
@ -1359,7 +1359,7 @@ WidenIV::getExtendedOperandRecurrence(WidenIV::NarrowIVDefUse DU) {
|
||||
/// so, return the extended recurrence and the kind of extension used. Otherwise
|
||||
/// return {nullptr, Unknown}.
|
||||
WidenIV::WidenedRecTy WidenIV::getWideRecurrence(WidenIV::NarrowIVDefUse DU) {
|
||||
if (!SE->isSCEVable(DU.NarrowUse->getType()))
|
||||
if (!DU.NarrowUse->getType()->isIntegerTy())
|
||||
return {nullptr, Unknown};
|
||||
|
||||
const SCEV *NarrowExpr = SE->getSCEV(DU.NarrowUse);
|
||||
|
@ -1,7 +1,7 @@
|
||||
; RUN: opt < %s -indvars -S | FileCheck %s
|
||||
|
||||
; Provide legal integer types.
|
||||
target datalayout = "n8:16:32:64"
|
||||
target datalayout = "e-p:32:32:32-n8:16:32:64"
|
||||
|
||||
|
||||
define void @foo(i64* nocapture %x, i32 %n) nounwind {
|
||||
|
Loading…
Reference in New Issue
Block a user