]> granicus.if.org Git - llvm/commitdiff
[InstCombine] Add TODOs for a couple things that should maybe be in InstSimplify...
authorCraig Topper <craig.topper@intel.com>
Tue, 4 Jul 2017 06:50:48 +0000 (06:50 +0000)
committerCraig Topper <craig.topper@intel.com>
Tue, 4 Jul 2017 06:50:48 +0000 (06:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307065 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/InstCombine/InstCombineCalls.cpp

index 3770021de1002d4c3ef9c71d88cf2597dd94fe2e..394a55a1294a2609a547b5ce2065b1adc8a31663 100644 (file)
@@ -1965,9 +1965,10 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
     Value *IIOperand = II->getArgOperand(0);
     Value *X = nullptr;
 
+    // TODO should this be in InstSimplify?
     // bswap(bswap(x)) -> x
     if (match(IIOperand, m_BSwap(m_Value(X))))
-        return replaceInstUsesWith(CI, X);
+      return replaceInstUsesWith(CI, X);
 
     // bswap(trunc(bswap(x))) -> trunc(lshr(x, c))
     if (match(IIOperand, m_Trunc(m_BSwap(m_Value(X))))) {
@@ -1984,6 +1985,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
     Value *IIOperand = II->getArgOperand(0);
     Value *X = nullptr;
 
+    // TODO should this be in InstSimplify?
     // bitreverse(bitreverse(x)) -> x
     if (match(IIOperand, m_BitReverse(m_Value(X))))
       return replaceInstUsesWith(CI, X);