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
  • src
  • Reactor
  • LLVMReactor.cpp
Find file
BlameHistoryPermalink
  • Nicolas Capens's avatar
    Work around MemorySanitizer scalar SSE false positives · c4d054c6
    Nicolas Capens authored May 12, 2021
    Scalar SSE instructions only use the lowest scalar of an SSE vector
    register, but MemorySanitizer doesn't recognize some of them so it will
    check the entire 128-bit operand for uninitialized bits.
    
    This change makes sure the other elements of the vector gets zero-
    initialized instead of leaving it undefined. This affects Round, Trunc,
    Frac, Ceil, Floor, Sqrt, and RcpSqrt scalar operations.
    
    Note that this workaround results in MemorySanitizer marking the entire
    output vector to have a well-defined value, which isn't actually the
    case in non-MSan builds. Fortunately, a scalar can't be cast into a
    vector (unlike our 'emulated' small vectors), so we just have to make
    sure to immediately extract the scalar from the intrinsic's result.
    
    Bug: b/172238865
    Change-Id: If68388e476ac9e27e2de33ddf2efab4124540c7a
    Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/54269
    Kokoro-Result: kokoro <noreply+kokoro@google.com>
    Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
    Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
    c4d054c6
LLVMReactor.cpp 131 KB
EditWeb IDE
×

Replace LLVMReactor.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.