llvm.org GIT mirror llvm / bc69dc1
Merging r168196: into the 3.2 release branch. Make this easier to understand, as suggested by Chandler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168594 91177308-0d34-0410-b5e6-96231b3b80d8 Pawel Wodnicki 6 years ago
2 changed file(s) with 12 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
20662066 // Determine Y and Z in the form icmp (X+Y), (X+Z).
20672067 Value *Y, *Z;
20682068 if (A == C) {
2069 // C + B == C + D -> B == D
20692070 Y = B;
20702071 Z = D;
20712072 } else if (A == D) {
2073 // D + B == C + D -> B == C
20722074 Y = B;
20732075 Z = C;
20742076 } else if (B == C) {
2077 // A + C == C + D -> A == D
20752078 Y = A;
20762079 Z = D;
2077 } else if (B == D) {
2080 } else {
2081 assert(B == D);
2082 // A + D == C + D -> A == C
20782083 Y = A;
20792084 Z = C;
20802085 }
23572357 // Determine Y and Z in the form icmp (X+Y), (X+Z).
23582358 Value *Y, *Z;
23592359 if (A == C) {
2360 // C + B == C + D -> B == D
23602361 Y = B;
23612362 Z = D;
23622363 } else if (A == D) {
2364 // D + B == C + D -> B == C
23632365 Y = B;
23642366 Z = C;
23652367 } else if (B == C) {
2368 // A + C == C + D -> A == D
23662369 Y = A;
23672370 Z = D;
2368 } else if (B == D) {
2371 } else {
2372 assert(B == D);
2373 // A + D == C + D -> A == C
23692374 Y = A;
23702375 Z = C;
23712376 }