search for: m_and

Displaying 9 results from an estimated 9 matches for "m_and".

Did you mean: _and
2008 Nov 09
0
[LLVMdev] m_Not Pattern Question
...t;B", which seems weird and > wrong to me. This is deliberate. m_Foo(V) means "match any Foo and put its result into V." The way it's generally used is to declare empty variables, match against them, and test the equality: Value *A, *B, *C, *D; if (match(Expr, m_Or(m_And(A, B), m_And(C, D))) { if (B == D) { ... do optimization ... Nick > -bw > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
2008 Nov 09
2
[LLVMdev] m_Not Pattern Question
I have a question about the pattern matching stuff that's used in the Instruction Combiner. If I have code like this: if (match(B, m_Select(m_Value(), m_ConstantInt(0), m_ConstantInt(-1)))) { if (match(C, m_Not(m_Value(B)))) return SelectInst::Create(cast<User>(B)->getOperand(0), D, A); and we match, the program fails during the
2005 Oct 05
1
[LLVMdev] Cast instructions
The following situation comes up a lot in what I'm doing. I want to check if a value is a certain kind of instruction. The test also needs to succeed if the value is a *cast* of the instruction (or a cast of a cast, etc.) I.e., I need to "see through" any intervening casts to get to the "real" value. It's trivial to write a function that does this, but does
2016 Jul 20
2
Hitting assertion failure related to vectorization + instcombine
...-vectorize -instcombine 1. Running pass 'Function Pass Manager' on module '<stdin>'. 2. Running pass 'Combine redundant instructions' on function '@strsave' --- Looking at the code, the issue is with this line: if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && *Y == ~*C) In this case Y is a 128-bit APInt, and so is the value that C is extracted from, but the m_APInt matcher has code that calls getSplatValue() if the matched expression has vector type. So C ends up as an 8-bit value, triggering the assertion...
2016 Jul 20
2
Hitting assertion failure related to vectorization + instcombine
...Manager' on module '<stdin>'. >> 2. Running pass 'Combine redundant instructions' on function '@strsave' >> >> --- >> >> Looking at the code, the issue is with this line: >> >> if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) && >> *Y == ~*C) >> >> In this case Y is a 128-bit APInt, and so is the value that C is >> extracted from, but the m_APInt matcher has code that calls getSplatValue() >> if the matched expression has vector type. So C ends up...
2016 Jul 22
2
Hitting assertion failure related to vectorization + instcombine
...>> 2. Running pass 'Combine redundant instructions' on function '@strsave' >>>> >>>> --- >>>> >>>> Looking at the code, the issue is with this line: >>>> >>>> if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), m_APInt(C))) >>>> && >>>> *Y == ~*C) >>>> >>>> In this case Y is a 128-bit APInt, and so is the value that C is >>>> extracted from, but the m_APInt matcher has code that calls getSplatValue() >>>&gt...
2016 Jul 25
2
Hitting assertion failure related to vectorization + instcombine
...gt;> >>>> '@strsave' >> >>>> >> >>>> --- >> >>>> >> >>>> Looking at the code, the issue is with this line: >> >>>> >> >>>> if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), >> >>>> m_APInt(C))) >> >>>> && >> >>>> *Y == ~*C) >> >>>> >> >>>> In this case Y is a 128-bit APInt, and so is the value that C is >> >>>> extracted from, but...
2016 Jul 27
0
Hitting assertion failure related to vectorization + instcombine
...'@strsave' >>> >>>> >>> >>>> --- >>> >>>> >>> >>>> Looking at the code, the issue is with this line: >>> >>>> >>> >>>> if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), >>> >>>> m_APInt(C))) >>> >>>> && >>> >>>> *Y == ~*C) >>> >>>> >>> >>>> In this case Y is a 128-bit APInt, and so is the value that C is >>> >>>&...
2016 Jul 28
1
Hitting assertion failure related to vectorization + instcombine
...gt;> >>>> > >>> >>>> --- > >>> >>>> > >>> >>>> Looking at the code, the issue is with this line: > >>> >>>> > >>> >>>> if (TrueVal == X && match(FalseVal, m_And(m_Specific(X), > >>> >>>> m_APInt(C))) > >>> >>>> && > >>> >>>> *Y == ~*C) > >>> >>>> > >>> >>>> In this case Y is a 128-bit APInt, and so is the value that C is &...