Displaying 7 results from an estimated 7 matches for "m_constantint".
Did you mean:
constantint
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 "SelectInst::Create" phase.
The problem is because B is now a Constant with "-2" as...
2008 Nov 09
0
[LLVMdev] m_Not Pattern Question
Bill Wendling wrote:
> 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 "SelectInst::Create" phase.
> The problem is because B is now a C...
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
2017 Mar 30
2
InstructionSimplify: adding a hook for shufflevector instructions
...at we're vectorizing more aggressively (and plan to do even more) and we're converting target-specific vector source to generic vector IR whenever possible, it makes sense to add these kinds of optimizations.
One frequently visible sign of scalar privilege in instcombine is the use of "m_ConstantInt". In many cases, this can be converted to "m_APInt" without much effort, and the transform will auto-magically apply to splat vector constants too.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may...
2017 Mar 30
2
InstructionSimplify: adding a hook for shufflevector instructions
As Sanjay noted in D31426<https://reviews.llvm.org/D31426#712701>, InstructionSimplify is missing the following simplification:
This function:
define <4 x i32> @splat_operand(<4 x i32> %x) {
%splat = shufflevector <4 x i32> %x, <4 x i32> undef, <4 x i32> zeroinitializer
%shuf = shufflevector <4 x i32> %splat, <4 x i32> undef, <4 x i32>
2015 Apr 06
2
[LLVMdev] inconsistent wording in the LangRef regarding "shl nsw"
The LangRef says this for left shifts:
"If the nsw keyword is present, then the shift produces a poison value
if it shifts out any bits that disagree with the resultant sign bit."
... (1)
followed by
"As such, NUW/NSW have the same semantics as they would if the shift
were expressed as a mul instruction with the same nsw/nuw bits in (mul
%op1, (shl 1, %op2))." ... (2)
But
2016 Apr 07
7
Implementing a proposed InstCombine optimization
I am not entirely sure this is safe. Transforming this to an fsub could change the value stored on platforms that implement negates using arithmetic instead of with bitmath (such as ours) and either canonicalize NaNs or don’t support denormals. This is actually important because this kind of bitmath on floats is very commonly used as part of algorithms for complex math functions that need to get