commit | 2dab551d649cb57127f7b3bea183f069883d76e4 | [log] [tgz] |
---|---|---|
author | Md Abdullah Shahneous Bari <Md.Abdullah.Shahneous.Bari@intel.com> | Mon Jun 05 10:46:29 2023 -0400 |
committer | Jakub Kuderski <kubak@google.com> | Mon Jun 05 10:52:09 2023 -0400 |
tree | 6bb139786146a7abeb54c916f93ac0b6977ef6b8 | |
parent | 143ed21b26b2c68695e9f74f0ce4632b8a2e000b [diff] |
[mlir][spirv] Change numeric constant's bit-extension decision to be based on type Integer constants with bit width less than a word (e.g., i8, i16) should be bit extended based on its type to be SPIR-V spec-compliant. Previously, the decision was based on the most significant bit of the value which ignores the signless semantics and causes problems when interfacing with SPIR-V tools. Dealing with numeric literals: the SPIR-V spec says, "If a numeric type’s bit width is less than 32-bits, the value appears in the low-order bits of the word, and the high-order bits must be 0 for a floating-point type or integer type with Signedness of 0, or sign extended for an integer type with a Signedness of 1 (similarly for the remaining bits of widths larger than 32 bits but not a multiple of 32 bits)." Therefore, signless integers (e.g., i8, i16) and unsigned integers should be 0-extended, and signed integers (e.g., si8, si16) should be sign-extended. Patch By: mshahneo Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D151767
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, or #llvm IRC channel on OFTC.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.