OSDN Git Service

Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changes
authorChris Lattner <sabre@nondot.org>
Sat, 11 Oct 2008 22:55:00 +0000 (22:55 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 11 Oct 2008 22:55:00 +0000 (22:55 +0000)
commita6321b40c22025b09c1bbff9df7f4b0470835b0b
tree23bd4ecb03c450667ab12192e6b753500d38e5e1
parent1b8f4bb4a1a46e8a2295bdaf0454a5c302863703
Fix PR2697 by rewriting the '(X / pos) op neg' logic.  This also changes
a couple other cases for clarity, but shouldn't affect correctness.

Patch by Eli Friedman!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57387 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/2008-10-11-DivCompareFold.ll [new file with mode: 0644]