Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
S
swiftshader
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Chen Yisong
  • swiftshader
  • Repository

Switch branch/tag
  • swiftshader
  • ..
  • GlobalISel
  • LegalityPredicates.cpp
Find file
BlameHistoryPermalink
  • Reid Kleckner's avatar
    Use pragmas to work around MSVC x86_32 debug miscompile bug · 43fcd32b
    Reid Kleckner authored Sep 10, 2020
    Halide users reported this here: https://llvm.org/pr46176
    I reported the issue to MSVC here:
    https://developercommunity.visualstudio.com/content/problem/1179643/msvc-copies-overaligned-non-trivially-copyable-par.html
    
    This codepath is apparently not covered by LLVM's unit tests, so I added
    coverage in a unit test.
    
    If we want to support this configuration going forward, it means that is
    in general not safe to pass a SmallVector<T, N> by value if alignof(T)
    is greater than 4. This doesn't appear to come up often because passing
    a SmallVector by value is inefficient and not idiomatic: it copies the
    inline storage. In this case, the SmallVector<LLT,4> is captured by
    value by a lambda, and the lambda is passed by value into std::function,
    and that's how we hit the bug.
    
    Differential Revision: https://reviews.llvm.org/D87475
    
    NOTE from amaiorano@ : applied this LLVM patch (without the unittest) to SwiftShader.
    
    Bug: b/173512119
    Change-Id: If036f61386b51f9b4a20427812b4ac92d901244d
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50469Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
    43fcd32b
LegalityPredicates.cpp 6.08 KB
EditWeb IDE
×

Replace LegalityPredicates.cpp

Attach a file by drag & drop or click to upload


Cancel
A new branch will be created in your fork and a new merge request will be started.