[llvm] [PatternMatch] Add a matching helper `m_ElementWiseBitCast`. NFC. (PR #80764)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 21:03:41 PST 2024


================
@@ -3034,7 +3034,7 @@ static Value *simplifyICmpWithConstant(CmpInst::Predicate Pred, Value *LHS,
   // floating-point casts:
   // icmp slt (bitcast (uitofp X)),  0 --> false
   // icmp sgt (bitcast (uitofp X)), -1 --> true
-  if (match(LHS, m_BitCast(m_UIToFP(m_Value(X))))) {
+  if (match(LHS, m_ElementWiseBitCast(m_UIToFP(m_Value(X))))) {
----------------
arsenm wrote:

Is this a bug fix missing tests?

https://github.com/llvm/llvm-project/pull/80764


More information about the llvm-commits mailing list