[PATCH] D62818: [InstCombine] Introduce fold for icmp pred (and X, (sh signbit, Y)), 0.

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 09:25:14 PDT 2019


spatel added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:1792-1795
+                           m_CombineAnd(m_Shift(m_SignMask(), m_Value(V1)),
+                                        m_Value(Shift)),
+                           m_CombineOr(m_Shl(m_Value(), m_Value()),
+                                       m_LShr(m_Value(), m_Value()))),
----------------
m_LogicalShift() ?


================
Comment at: test/Transforms/InstCombine/signbit-shl-and-icmpeq-zero.ll:180
 
 ; Negative tests
 
----------------
I didn't step through the transforms, but it seems wrong to call this a 'negative test'. This patch must have fired and allowed further simplification?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62818/new/

https://reviews.llvm.org/D62818





More information about the llvm-commits mailing list