[PATCH] Bitcode: Add bitcode format compatibility test

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Jul 31 12:13:50 PDT 2015


> On 2015-Jul-31, at 10:42, Vedant Kumar <vsk at apple.com> wrote:
> 
>>> -* The bitcode format produced by a X.Y release will be readable by all following
>>> -  X.Z releases and the (X+1).0 release.
>>> +* The bitcode format produced by a X.Y release will be readable by all
>>> +  following X.Z releases and the (X+1).0 release. To help ensure this, an X.Y
>>> +  version of ``test/Bitcode/compatibility.ll`` should be assembled and
>>> +  committed before each release.
>> 
>> s/before/after/
> 
> Done.
> 
> 
>>> * Newer releases can ignore features from older releases, but they cannot
>>>  miscompile them. For example, if nsw is ever replaced with something else,
>> 
>> Please also add a point (maye earlier?) stating that new/changed IR constructs
>> should get added to test/Bitcode/compatibility.ll.
> 
> Done.
> 
> 
>>> diff --git a/test/Bitcode/compatibility.ll b/test/Bitcode/compatibility.ll
>>> new file mode 100644
>>> index 0000000..46aebba
>>> --- /dev/null
>>> +++ b/test/Bitcode/compatibility.ll
>>> @@ -0,0 +1,1275 @@
>>> +; Bitcode compatibility test for llvm-3.7
>> 
>> This shouldn't mention llvm-3.7; this is for trunk.
> 
> Removed reference to 3.7.
> 
> 
>> However, it should duplicate the info from docs/DeveloperPolicy.rst (and
>> reference it).
> 
> Done.
> 
> Patch attached --
> 
> <bccompat-submit.patch>


I'm getting a failure:

******************** TEST 'LLVM :: Bitcode/compatibility.ll' FAILED ********************
Script:
--
/Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-as < /Volumes/Data/llvm/staging/test/Bitcode/compatibility.ll | /Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-dis | /Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-as | /Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-dis | /Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/FileCheck /Volumes/Data/llvm/staging/test/Bitcode/compatibility.ll
/Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/verify-uselistorder < /Volumes/Data/llvm/staging/test/Bitcode/compatibility.ll
--
Exit Code: 1

Command Output (stderr):
--
/Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-as: assembly parsed, but does not verify as correct!
The landingpad instruction should have a consistent result type inside a function.
  %7 = landingpad { i8*, i32 }
          filter [2 x i32] zeroinitializer
/Users/dexonsmith/data/llvm.symbols+asserts/staging/./bin/llvm-dis: error: Invalid bitcode signature
--

It looks like there's something wrong with your examples for landing
pads.  Can you take a look?



More information about the llvm-commits mailing list