[llvm] [IR] Add nowrap flags for trunc instruction (PR #85592)

via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 15:01:19 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 7c83d1bd612783634aae33baf8765ecfdcc5cd0d 4e587ec3d65e0e30cdeb379c0d0112bb6837397a -- llvm/include/llvm/Bitcode/LLVMBitCodes.h llvm/include/llvm/IR/Instructions.h llvm/lib/AsmParser/LLParser.cpp llvm/lib/Bitcode/Reader/BitcodeReader.cpp llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/IR/AsmWriter.cpp llvm/lib/IR/Instruction.cpp llvm/lib/IR/Operator.cpp llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/IR/Instructions.h b/llvm/include/llvm/IR/Instructions.h
index e55f026133..4ffa634987 100644
--- a/llvm/include/llvm/IR/Instructions.h
+++ b/llvm/include/llvm/IR/Instructions.h
@@ -5345,11 +5345,7 @@ protected:
   TruncInst *cloneImpl() const;
 
 public:
-  enum {
-    AnyWrap = 0,
-    NoUnsignedWrap = (1 << 0),
-    NoSignedWrap = (1 << 1)
-  };
+  enum { AnyWrap = 0, NoUnsignedWrap = (1 << 0), NoSignedWrap = (1 << 1) };
 
   /// Constructor with insert-before-instruction semantics
   TruncInst(

``````````

</details>


https://github.com/llvm/llvm-project/pull/85592


More information about the llvm-commits mailing list