search for: instcombineandorxor

Displaying 10 results from an estimated 10 matches for "instcombineandorxor".

2011 Aug 04
3
[LLVMdev] Multiple one-line bugs in LLVM
...dWrap(); There are identical sub-expressions 'LBO->hasNoUnsignedWrap()' to the left and to the right of the '&&' operator. Looks like the correct code is     bool NUW = LBO->hasNoUnsignedWrap() && RBO->hasNoUnsignedWrap(); ---- lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1384   if (InputByteNo < ByteValues.size()/2) {     if (ByteValues.size()-1-DestByteNo != InputByteNo)       return true;   } else {     if (ByteValues.size()-1-DestByteNo != InputByteNo)       return true;   } Note that 'then' and 'else' are the same. It can be a problem or...
2013 May 02
1
[LLVMdev] Bug in InstCombiner::FoldAndOfFCmps
On 5/2/2013 4:20 PM, Rafael Espíndola wrote: > > I don't get any errors compiling this. Do you know if it was fixed? Do > you get an error only for some particular target? What is the 'clang > -cc1' command line that you seed in the error? I see this error in our compiler, but not with the trunk. I guess it's been fixed, but I don't know which commit did it.
2016 Dec 08
2
BSWAP matching in codegen
...found a fix for this in our fork, but the fix is even worse in that it matches a whole bunch of invalid patterns as well as the canonical patterns. I have simple test cases that break both the existing code and our local fix. I see equivalent matching code upstream in InstCombiner::MatchBSwap() (InstCombineAndOrXor.cpp), but not an easy way to re-use it AFAICT. Questions: --Is this functionality even worth fixing in DAGCombiner (ie, what is the probability that this complex pattern would re-emerge in codegen after the InstCombiner transform, weighed against the obviously error-prone nature of the matching co...
2011 Aug 04
0
[LLVMdev] Multiple one-line bugs in LLVM
...t; to the right of the '&&' operator. Looks like the correct code is > > bool NUW = LBO->hasNoUnsignedWrap()&& RBO->hasNoUnsignedWrap(); That is correct. Ivan sent a patch for this too and I applied it. > > ---- > > lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:1384 > if (InputByteNo< ByteValues.size()/2) { > if (ByteValues.size()-1-DestByteNo != InputByteNo) > return true; > } else { > if (ByteValues.size()-1-DestByteNo != InputByteNo) > return true; > } > > Note that 'then' and...
2011 Jul 27
0
[LLVMdev] XOR Optimization
2011/7/26 Daniel Nicácio <dnicacios at gmail.com>: > > I also would like to see why the "XOR  A,  -1" is not turned into a NOT, any > Probably because NOT (like NEG) doesn't exist :) <http://llvm.org/docs/LangRef.html#instref> I assume the decision was made that it wasn't worth adding the extra unary instructions when they can easily be handled in codegen
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
2011 Jul 28
1
[LLVMdev] XOR Optimization
...----- A non-text attachment was scrubbed... Name: XORChain.png Type: image/png Size: 59953 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110728/a5bc09cf/attachment.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: InstCombineAndOrXor.diff Type: application/octet-stream Size: 635 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110728/a5bc09cf/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: InstructionCombining.diff Type: application/...
2011 Jul 27
2
[LLVMdev] XOR Optimization
After a few more tests, I found out that if we set -unroll-threshold to a value large enough, and run "opt -std-compile-opts" or "opt -O3" 3 times, the unroll will be able to unroll the original loop 32 times, and when you have it unrolled for at least 32 times a optimization is triggered, folding it to a single "%xor.3.3.1 = xor i32 %tmp6, -1" (dont know why it does
2016 Dec 08
2
BSWAP matching in codegen
...ns. I have simple test cases that break both the existing code and our local fix. Are you sure there isn't any test coverage? As far as I can tell, the tests from https://reviews.llvm.org/rL133503 are still in the tree. I see equivalent matching code upstream in InstCombiner::MatchBSwap() (InstCombineAndOrXor.cpp), but not an easy way to re-use it AFAICT. Questions: --Is this functionality even worth fixing in DAGCombiner (ie, what is the probability that this complex pattern would re-emerge in codegen after the InstCombiner transform, weighed against the obviously error-prone nature of the matching co...
2015 Jul 29
1
[LLVMdev] Error when i am using command make -j4 command in cygwin to compile safecode
...tCombine' llvm[3]: Compiling InstCombineAddSub.cpp for Release+Asserts build llvm[3]: Compiling LoopRerollPass.cpp for Release+Asserts build llvm[3]: Compiling X86SelectionDAGInfo.cpp for Release+Asserts build llvm[3]: Compiling DwarfCFIException.cpp for Release+Asserts build llvm[3]: Compiling InstCombineAndOrXor.cpp for Release+Asserts build llvm[3]: Compiling X86Subtarget.cpp for Release+Asserts build llvm[3]: Compiling LoopRotation.cpp for Release+Asserts build llvm[3]: Compiling DwarfCompileUnit.cpp for Release+Asserts build llvm[3]: Compiling X86TargetMachine.cpp for Release+Asserts build llvm[3]: Comp...