[llvm] InstSimplify: strip bad TODO (NFC) (PR #92754)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 06:52:34 PDT 2024


https://github.com/artagnon created https://github.com/llvm/llvm-project/pull/92754

foldIdentityShuffles() has a TODO comment about looking through bitcasts. Looking through any intervening instructions when folding shuffles is out-of-scope of InstructionSimplify, as the analysis is not allowed to modify the IR in any way. Strip this bad TODO.

>From bbdc03d748b3d8667b181fd0013b242ca649a217 Mon Sep 17 00:00:00 2001
From: Ramkumar Ramachandra <r at artagnon.com>
Date: Mon, 20 May 2024 14:47:52 +0100
Subject: [PATCH] InstSimplify: strip bad TODO (NFC)

foldIdentityShuffles() has a TODO comment about looking through
bitcasts. Looking through any intervening instructions when folding
shuffles is out-of-scope of InstructionSimplify, as the analysis is not
allowed to modify the IR in any way. Strip this bad TODO.
---
 llvm/lib/Analysis/InstructionSimplify.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 37a7259a5cd02..e88736b5fab8d 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -5346,9 +5346,6 @@ static Value *foldIdentityShuffles(int DestElt, Value *Op0, Value *Op1,
         SourceShuf->getMaskValue(RootElt), RootVec, MaxRecurse);
   }
 
-  // TODO: Look through bitcasts? What if the bitcast changes the vector element
-  // size?
-
   // The source operand is not a shuffle. Initialize the root vector value for
   // this shuffle if that has not been done yet.
   if (!RootVec)



More information about the llvm-commits mailing list