SuccessChanges

Summary

  1. [NFC][InstCombine] Add a few extra srem-by-power-of-two tests - extra uses
  2. [InstCombine] Remove insertRangeTest code that handles the equality case. For equality, the function called getTrue/getFalse with the VT of the comparison input. But getTrue/getFalse need the boolean VT. So if this code ever executed, it would assert. I believe these cases are removed by InstSimplify so we don't get here. So this patch just fixes up an assert to exclude the equality possibility and removes the broken code.
  3. [InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt operations instead. NFCI AddOne/SubOne create new Constant objects. That seems heavy for comparing ConstantInts which wrap APInts. Just do the math on on the APInts and compare them.
Revision 366652 by lebedevri:
[NFC][InstCombine] Add a few extra srem-by-power-of-two tests - extra uses
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/test/Transforms/InstCombine/rem.ll (diff)llvm.src/test/Transforms/InstCombine/rem.ll
Revision 366649 by ctopper:
[InstCombine] Remove insertRangeTest code that handles the equality case.

For equality, the function called getTrue/getFalse with the VT
of the comparison input. But getTrue/getFalse need the boolean VT.
So if this code ever executed, it would assert.

I believe these cases are removed by InstSimplify so we don't get here.

So this patch just fixes up an assert to exclude the equality
possibility and removes the broken code.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
Revision 366648 by ctopper:
[InstCombine] Don't use AddOne/SubOne to see if two APInts are 1 apart. Use APInt operations instead. NFCI

AddOne/SubOne create new Constant objects. That seems heavy for
comparing ConstantInts which wrap APInts. Just do the math on
on the APInts and compare them.
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (diff)llvm.src/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp