[llvm-testresults] buildbot failure in smooshlab on llvm-gcc-x86_64-darwin10-selfhost

daniel_dunbar at apple.com daniel_dunbar at apple.com
Thu Aug 26 03:29:45 PDT 2010


The Buildbot has detected a new failure of llvm-gcc-x86_64-darwin10-selfhost on smooshlab.
Full details are available at:
 http://smooshlab.apple.com:8010/builders/llvm-gcc-x86_64-darwin10-selfhost/builds/5244

Buildbot URL: http://smooshlab.apple.com:8010/

Buildslave for this Build: smoosh-04

Build Reason: 
Build Source Stamp: 112176
Blamelist: void

BUILD FAILED: failed test-llvm

sincerely,
 -The Buildbot


================================================================================

CHANGES:
File: lib/Target/ARM/ARMInstrThumb2.td
At: Thu 26 Aug 2010 02:09:40
Changed By: void
Comments: There seems to be a (potential) hardware bug with the CMN instruction and
comparison with 0. These two pieces of code should give identical results:

  rsbs r1, r1, 0
  cmp  r0, r1
  mov  r0, #0
  it   ls
  mov  r0, #1

and:

  cmn  r0, r1
  mov  r0, #0
  it   ls
  mov  r0, #1

However, the CMN gives the *opposite* result when r1 is 0. This is because the
carry flag is set in the CMP case but not in the CMN case. In short, the CMP
instruction doesn't perform a truncate of the (logical) NOT of 0 plus the value
of r0 and the carry bit (because the "carry bit" parameter to AddWithCarry is
defined as 1 in this case, the carry flag will always be set when r0 >= 0). The
CMN instruction doesn't perform a NOT of 0 so there is never a "carry" when this
AddWithCarry is performed (because the "carry bit" parameter to AddWithCarry is
defined as 0).

The AddWithCarry in the CMP case seems to be relying upon the identity:

  ~x + 1 = -x

However when x is 0 and unsigned, this doesn't hold:

   x = 0
  ~x = 0xFFFF FFFF
  ~x + 1 = 0x1 0000 0000
  (-x = 0) != (0x1 0000 0000 = ~x + 1)

Therefore, we should disable *all* versions of CMN, especially when comparing
against zero, until we can limit when the CMN instruction is used (when we know
that the RHS is not 0) or when we have a hardware fix for this.

(See the ARM docs for the "AddWithCarry" pseudo-code.)

This is related to <rdar://problem/7569620>.

Properties: 




LOGS:
Last 10 lines of 'stdio':
	    LLVM :: CodeGen/Thumb2/thumb2-cmn.ll
	    LLVM :: CodeGen/Thumb2/thumb2-cmn2.ll
	    LLVM :: MC/Disassembler/thumb-tests.txt
	
	  Expected Passes    : 5437
	  Expected Failures  : 37
	  Unsupported Tests  : 40
	  Unexpected Failures: 3
	make[1]: *** [check-local-lit] Error 1
	make: *** [check] Error 2

Last 10 lines of 'dg.log':
	

Last 10 lines of 'dg.sum':
	

Last 10 lines of 'warnings':
	/Users/buildslave/zorg/buildbot/smooshlab/slave/build.llvm-gcc-x86_64-darwin10-selfhost/llvm.src/test/MC/Disassembler/thumb-tests.txt:25:1: warning: invalid instruction encoding




More information about the llvm-testresults mailing list