[llvm-commits] [llvm-testresults] buildbot failure in The LLVM Compiler Infrastructure on full-llvm-OSX

Dan Gohman gohman at apple.com
Wed May 6 09:55:52 PDT 2009


On May 6, 2009, at 9:01 AM, David Greene wrote:

> On Tuesday 05 May 2009 15:44, Bill Wendling wrote:
>> David,
>>
>> Your recent check-in r71008 is causing this failure. Please  
>> investigate:
>>
>> Running /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
>> CodeGen/X86/dg.exp ...
>> FAIL: /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/test/
>> CodeGen/X86/change-compare-stride-1.ll
>> Failed with exit(1) at line 2
>> while running: grep {cmpq	$-478,} change-compare-stride-1.ll.tmp
>> child process exited abnormally
>
> This seems to be a bug in APInt.  From LoopStrengthReduce.cpp:
>
>      Scale = SSInt / CmpSSInt;
>      int64_t NewCmpVal = CmpVal * Scale;
>      APInt Mul = APInt(BitWidth*2, CmpVal);
>      Mul = Mul * APInt(BitWidth*2, Scale);
>
>      // Check for overflow.
>      if (!Mul.isSignedIntN(BitWidth))
>
> (gdb) print SSInt
> $30 = -478
> (gdb) print CmpSSInt
> $31 = 1
> (gdb) print NewCmpVal
> $32 = -304964
> (gdb) p/x Mul.pVal[0]
> $34 = 0xfffffffffffb58bc
> (gdb) p/x Mul.pVal[1]
> $35 = 0x27d
> (gdb) print Mul.isNegative()
> $36 = false


APInt's constructor has a third argument, which is a boolean
specifying whether the uint64_t argument should be sign-extended
out to the specified bit width. It defaults to false, so the
values here are being zero-extended out to 128 bits before
the multiply. It looks like true should be passed here, in
order to get a full signed multiply.

Dan




More information about the llvm-commits mailing list