similar to: [LLVMdev] [llvm-commits] [llvm] r92458 - in /llvm/trunk: lib/Target/README.txt lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/or.ll

Displaying 20 results from an estimated 200 matches similar to: "[LLVMdev] [llvm-commits] [llvm] r92458 - in /llvm/trunk: lib/Target/README.txt lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/or.ll"

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
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
2017 Jul 13
2
failing to optimize boolean ops on cmps
This can't be an instsimplify though? The values we want in these cases do not exist already: %res = or i8 %b, %a %res = or i1 %cmp, %c On Thu, Jul 13, 2017 at 5:10 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > On Thu, Jul 13, 2017 at 2:12 PM, Sanjay Patel <spatel at rotateright.com> > wrote: > >> We have several optimizations in InstCombine
2008 May 17
0
[LLVMdev] More info, was Help needed after hiatus
On Sat, May 17, 2008 at 11:34 AM, Richard Pennington <rich at pennware.com> wrote: > If I run the optimizer (opt) on this code snippet with -std-compile-opts > the optimizer hangs. > > > ; ModuleID = 'test.ubc' > target datalayout = >
2017 Jul 14
2
failing to optimize boolean ops on cmps
On 07/13/2017 06:40 PM, Daniel Berlin via llvm-dev wrote: > Ah yes, it can only return one instruction and you need two. > > NewGVN could still handle it if instsimplify was changed to return the > right binary operators because it has infrastructure that can handle > insertion. > (it would need a little work). > > > (At this point, InstCombine seems to have become
2018 Dec 18
2
should we do this time-consuming transform in InstCombine?
Hi Roman, Thanks for your good idea. I think it can solve the abs issue very well. I can continue with my work now^-^. But if it is not abs and there is no select, %res = OP i32 %b, %a %sub = sub i32 0, %b %res2 = OP i32 %sub, %a theoretically, we can still do the following transform for the above pattern: %res2 = OP i32 %sub, %a ==> %res2 = sub i32 0, %res Not sure whether we can do it
2015 Apr 15
2
[LLVMdev] Instruction combiner multiplication canonicalization
Hi, I observed below behavior with Instruction combiner (visitMul Canonicalization) It tries to convert "(X+C1)*C2" to "X*C2+C1*C2" While transforming if operation is guaranteed to not overflow it does not reflect same property to transformed instructions. Consider following scenarios: 1) If input is ((X+C1)*C2)<nsw> Then post canonicalization output should be
2019 Dec 31
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
Dear All, The InstCombine pass performs the following transformation. Z / (X / Y) => (Y * Z) / X This is performed only when operand Op1 ( (X/Y) in this case) has only one use in future. The code snippet is shown below. if (match(Op1, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))) && (!isa<Constant>(Y) || !isa<Constant>(Op0))) { // Z / (X / Y) => (Y *
2012 Oct 30
0
[LLVMdev] Any plan to add MIN/MAX isd node?
Hi Yin, > To use select, usually, there is a compare before select. > Presence of comparison will disable some opportunities to > optimize some code. Select and Compare is not associative > neither. at the IR level LLVM already has pattern matching helpers for identifying min/max idioms, here is part of a transform using this, from InstructionSimplify.cpp: // Signed variants
2012 Oct 30
1
[LLVMdev] Any plan to add MIN/MAX isd node?
Hi Duncan, Yes, exactly. However, we need define Opcode MIN/MAX Into ISDOpcodes.h. Do you like to add those two definitions Into the tree? Thanks, Yin -----Original Message----- From: Duncan Sands [mailto:duncan.sands at gmail.com] On Behalf Of Duncan Sands Sent: Tuesday, October 30, 2012 12:10 PM To: Yin Ma Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] Any plan to
2017 Jul 13
2
failing to optimize boolean ops on cmps
We have several optimizations in InstCombine for bitwise logic ops (and/or/xor) that fail to handle compare patterns with the equivalent bitwise logic. Example: define i8 @or_and_not(i8 %a, i8 %b) { %nota = xor i8 %a, -1 %and = and i8 %nota, %b %res = or i8 %and, %a ret i8 %res } define i1 @or_and_cmp_not(i32 %a, i32 %b, i1 %c) { %cmp = icmp sgt i32 %a, %b %cmp_inv = icmp sle i32 %a,
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
2020 Nov 16
1
Complex proposal v3 + roundtable agenda
On Fri, Nov 13, 2020 at 3:01 PM Florian Hahn <florian_hahn at apple.com> wrote: > > > > On Nov 12, 2020, at 21:36, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > > On Thu, Nov 12, 2020 at 2:47 PM Florian Hahn <florian_hahn at apple.com> wrote: > > There certainly is some pieces around the edges that will need adjusting or become obsolete, but I
2020 Jan 03
3
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
A couple more general comments: 1. There shouldn't be any correctness issues removing one-use checks (the transform should be safe independently of use-counts). 2. Ideally, you can remove a m_OneUse() from the code and run 'make check' or similar, and you will see a regression test failure because we have a 'negative' test to cover that pattern. That should make it clear that
2020 Nov 13
0
Complex proposal v3 + roundtable agenda
> On Nov 12, 2020, at 21:36, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > > On Thu, Nov 12, 2020 at 2:47 PM Florian Hahn <florian_hahn at apple.com <mailto:florian_hahn at apple.com>> wrote: >> >> There certainly is some pieces around the edges that will need adjusting or become obsolete, but I would hope/expect the majority of the work to be
2020 Jan 06
2
Any significance for m_OneUse in (X / Y) / Z => X / (Y * Z) ??
Is your case the case mentioned in the subject or a different case? ~Craig On Sun, Jan 5, 2020 at 8:11 PM raghesh <raghesh.a at gmail.com> wrote: > Thanks Sanjay for your comments. > > So, if we want to add a transformation avoiding the one-use check, which > one is the ideal pass? Shall we do it in -aggressive-instcombine? I came > to know that if the pattern search
2014 May 20
0
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
On May 19, 2014, at 7:12 PM, Stefan Bruda wrote: > Hello, > > First of all thank you so much for the information. No problem, glad it is useful. > [...] > Therefore as far as my UPS is concerned s_value[5] is wildly > incorrect. So it turns out that the RM15002U also does not report anything useful for s_value[5]:
2014 Jul 01
2
[LLVMdev] Probable error in InstCombine
I've found what appears to be a bug in instcombine. Specifically, the transformation of -(X/C) to X/(-C) is invalid if C == INT_MIN. Specifically, if I have > define i32 @foo(i32 %x) #0 { > entry: > %div = sdiv i32 %x, -2147483648 > %sub = sub nsw i32 0, %div > ret i32 %sub > } then opt -instcombine will produce > define i32 @foo(i32 %x) #0 { > entry: > %sub
2014 May 19
2
Tripp Lite SMART3000RM2U (protocol 3003) running time and charge?
Hello, First of all thank you so much for the information. At 22:43 -0400 on 2014-5-15 Charles Lepple wrote: > > On May 15, 2014, at 9:39 PM, Stefan Bruda wrote: > > > What bugs be though is that I cannot seem to be able to read the > > remaining run time on battery. The battery charge is also widely > > inaccurate (it drops to zero really fast and stays
2020 Nov 12
2
Complex proposal v3 + roundtable agenda
On Thu, Nov 12, 2020 at 2:47 PM Florian Hahn <florian_hahn at apple.com> wrote: > > > > On Nov 12, 2020, at 18:52, Cameron McInally <cameron.mcinally at nyu.edu> wrote: > > On Thu, Nov 12, 2020 at 12:03 PM Florian Hahn via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > Hi, > > There’s growing interest among our users to make better use of