OSDN Git Service

Make LSR's OptimizeShadowIV ignore induction variables with negative
authorDan Gohman <gohman@apple.com>
Mon, 26 Oct 2009 15:32:57 +0000 (15:32 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 26 Oct 2009 15:32:57 +0000 (15:32 +0000)
commita8225083ba7b2368cec0ced232e43dc77d5f6f0a
tree1d9642aa0ac70355002c616fa9d317b6b95188f5
parenta5dc45e3c8fa26e62b187284a240adf3879b56e2
Make LSR's OptimizeShadowIV ignore induction variables with negative
strides for now, because it doesn't handle them correctly. This fixes a
miscompile of SingleSource/Benchmarks/Misc-C++/ray.

This problem was usually hidden because indvars transforms such induction
variables into negations of canonical induction variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85118 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/X86/negative-stride-fptosi-user.ll [new file with mode: 0644]