[llvm-commits] [llvm] r154955 - /llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Joel Jones joel_k_jones at apple.com
Tue Apr 17 22:18:01 PDT 2012


I'd like to apologize to the LLVM community for the way I dealt with this commit.

I preemptively did the commit without sufficiently addressing the review comments
and misrepresented Evan's intent.

I did not make sufficiently clear the reason why I was committing this change. I also
did not make clear the issues that exist in making a test case that could be publicly 
committed.  I apologize for preemptively using my commit privileges.

I am working on trying to reduce the extant test case into something that is acceptable
for submittal.

Joel Jones

On Apr 17, 2012, at 3:23 PM, Joel Jones wrote:

> Author: joel_k_jones
> Date: Tue Apr 17 17:23:10 2012
> New Revision: 154955
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=154955&view=rev
> Log:
> Fixes a problem in instruction selection with testing whether or not the 
> transformation:
> 
> (X op C1) ^ C2 --> (X op C1) & ~C2 iff (C1&C2) == C2
> 
> should be done.  
> 
> This change has been tested:
> Using a debug+asserts build:
>   on the specific test case that brought this bug to light
>   make check-all
>   lnt nt
>   using this clang to build a release version of clang
> Using the release+asserts clang-with-clang build:
>   on the specific test case that brought this bug to light
>   make check-all
>   lnt nt
> 
> Checking in because Evan wants it checked in.  Test case forthcoming after
> scrubbing.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=154955&r1=154954&r2=154955&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Tue Apr 17 17:23:10 2012
> @@ -1367,8 +1367,9 @@
>     // bits on that side are also known to be set on the other side, turn this
>     // into an AND, as we know the bits will be cleared.
>     //    e.g. (X | C1) ^ C2 --> (X | C1) & ~C2 iff (C1&C2) == C2
> -    if ((NewMask & (KnownZero|KnownOne)) == NewMask) { // all known
> -      if ((KnownOne & KnownOne2) == KnownOne) {
> +    // NB: it is okay if more bits are known than are requested
> +    if ((NewMask & (KnownZero|KnownOne)) == NewMask) { // all known on one side 
> +      if (KnownOne == KnownOne2) { // set bits are the same on both sides
>         EVT VT = Op.getValueType();
>         SDValue ANDC = TLO.DAG.getConstant(~KnownOne & NewMask, VT);
>         return TLO.CombineTo(Op, TLO.DAG.getNode(ISD::AND, dl, VT,
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list