Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update test cases to LLVM 11.0 #158

Closed
13 tasks done
mewmew opened this issue Nov 8, 2020 · 4 comments
Closed
13 tasks done

update test cases to LLVM 11.0 #158

mewmew opened this issue Nov 8, 2020 · 4 comments

Comments

@mewmew
Copy link
Member

mewmew commented Nov 8, 2020

The test cases have been updated to LLVM 11.0, using the same steps as in #132 (comment)

Use branch llvm-11.0-testdata of the testdata repository.

These are the currently failing test cases.

Test case mismatch

Note, it is quite likely that a few of the original test cases have been updated. In these cases, we must also update our .golden file of those test cases.

For errors like asm_test.go:531: module "../testdata/llvm/test/Analysis/CostModel/AMDGPU/fdiv.ll.golden" mismatch (-want +got):

See #132 (comment) for example on how to update these kind of test cases.

  • Golden test case has to be updated
    • testdata/llvm/test/Analysis/CostModel/AMDGPU/fdiv.ll.golden
    • testdata/llvm/test/Transforms/InstCombine/fma.ll.golden
    • testdata/llvm/test/Transforms/InstCombine/vec_demanded_elts.ll.golden
    • testdata/llvm/test/Assembler/auto_upgrade_intrinsics.ll.golden
    • testdata/llvm/test/Assembler/fast-math-flags.ll.golden
    • testdata/llvm/test/DebugInfo/X86/DIModuleContext.ll.golden
    • testdata/llvm/test/Transforms/InstCombine/vec_demanded_elts.ll.golden

Fixed in rev llir/testdata@a3f3b7a.

Parse errors

These requires update to the LLVM IR grammar (for inspiration, see #101 for update of grammar to LLVM 9.0)

For errors like asm_test.go:516: unable to parse "../testdata/llvm/test/Transforms/InstSimplify/compare.ll" into AST; syntax error at line 1676:

@mewmew mewmew mentioned this issue Nov 8, 2020
mewmew added a commit to llir/testdata that referenced this issue Nov 11, 2020
mewmew added a commit to llir/testdata that referenced this issue Mar 24, 2021
* llvm: update test cases to LLVM 11.0 release

This was done by following the steps outlined in #132 and
llir/llvm#105 (comment)

* llvm: update golden test cases to LLVM 11.0

Updates llir/llvm#158.
@dannypsnl
Copy link
Member

  • testdata/llvm/test/Transforms/InstSimplify/compare.ll:
    panic: unable to parse integer "u0x100000001"; strconv.ParseInt: parsing "u0x100000001": invalid syntax

@dannypsnl
Copy link
Member

dannypsnl commented Mar 24, 2021

And

  • testdata/llvm/test/DebugInfo/X86/DIModule.ll
  • testdata/llvm/test/DebugInfo/X86/clang-module.ll

seems stuck by DIModule parsing error, DIModule sysroot cannot be parsed(but it should).

@mewmew
Copy link
Member Author

mewmew commented Mar 24, 2021

It seems the sysroot value is not quoted in the output.

Current output of llir/llvm:

!0 = distinct !DICompileUnit(language: DW_LANG_ObjC, file: !1, producer: "LLVM version 3.7.0", runtimeVersion: 2, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !3, sysroot: /)

Should be sysroot: "/" rather than sysroot: /

@mewmew
Copy link
Member Author

mewmew commented Mar 25, 2021

This issue has now been resolved, and all LLVM 11.0 test cases are passing. Incredible work @dannypsnl!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants