[llvm-branch-commits] [llvm] Add SimplifyTypeTests pass. (PR #141327)
Peter Collingbourne via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jun 4 15:03:00 PDT 2025
https://github.com/pcc updated https://github.com/llvm/llvm-project/pull/141327
>From b36c74c344ed47b99e9bfdc28f9081c3c704d8c7 Mon Sep 17 00:00:00 2001
From: Peter Collingbourne <peter at pcc.me.uk>
Date: Tue, 27 May 2025 23:08:59 -0700
Subject: [PATCH] Format
Created using spr 1.3.6-beta.1
---
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
index 907a664b0f936..26238acbb3f4d 100644
--- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -2508,8 +2508,8 @@ PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
};
for (User *U : make_early_inc_range(GV.users())) {
if (auto *CI = dyn_cast<ICmpInst>(U)) {
- if (CI->getPredicate() == CmpInst::ICMP_EQ &&
- MaySimplifyPtr(CI->getOperand(0))) {
+ if (CI->getPredicate() == CmpInst::ICMP_EQ &&
+ MaySimplifyPtr(CI->getOperand(0))) {
// This is an equality comparison (TypeTestResolution::Single case in
// lowerTypeTestCall). In this case we just replace the comparison
// with true.
@@ -2538,8 +2538,8 @@ PreservedAnalyses SimplifyTypeTestsPass::run(Module &M,
if (U.getOperandNo() == 1 && CI &&
CI->getPredicate() == CmpInst::ICMP_EQ &&
MaySimplifyInt(CI->getOperand(0))) {
- // This is an equality comparison. Unlike in the case above it remained
- // as an integer compare.
+ // This is an equality comparison. Unlike in the case above it
+ // remained as an integer compare.
CI->replaceAllUsesWith(ConstantInt::getTrue(M.getContext()));
CI->eraseFromParent();
Changed = true;
More information about the llvm-branch-commits
mailing list