[CostModel] Fix cast crash
authorSam Parker <sam.parker@arm.com>
Thu, 2 Jul 2020 11:13:23 +0000 (12:13 +0100)
committerSam Parker <sam.parker@arm.com>
Fri, 3 Jul 2020 06:53:45 +0000 (07:53 +0100)
commit0724153bbeb543b329c3af51930092f2d73c503e
tree3c3846678a6d611e5cf4d657dda3d21049d00361
parent03828e38c3cf6f1b8f548b724bcf46e0cffeeac8
[CostModel] Fix cast crash

Don't presume instruction operands while matching reductions.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=46430

Differential Revision: https://reviews.llvm.org/D82453
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/test/Transforms/LoopUnroll/X86/pr46430.ll [new file with mode: 0644]