From 12401e71e2b41ca028f5bbbd5fa1598d3c429497 Mon Sep 17 00:00:00 2001 From: David Sherwood Date: Tue, 21 Oct 2025 11:37:42 +0000 Subject: [PATCH 1/4] [LV][NFC] Remove undef values in simple cases Split off from PR #163525, this standalone patch replaces simple cases where undef is used as a value for arithmetic or getelementptr instructions. This will reduce the likelihood of contributors hitting the `undef deprecator` warning in github. --- .../X86/consecutive-ptr-cg-bug.ll | 12 +- .../LoopVectorize/X86/cost-model-assert.ll | 20 ++-- .../X86/interleaved-accesses-large-gap.ll | 12 +- .../demanded-bits-of-pointer-instruction.ll | 4 +- .../LoopVectorize/if-pred-stores.ll | 18 +-- .../Transforms/LoopVectorize/nsw-crash.ll | 4 +- llvm/test/Transforms/LoopVectorize/optsize.ll | 105 ++++++------------ llvm/test/Transforms/LoopVectorize/pr32859.ll | 4 +- llvm/test/Transforms/LoopVectorize/pr36311.ll | 10 +- .../Transforms/LoopVectorize/reduction-ptr.ll | 4 +- .../LoopVectorize/reduction-small-size.ll | 4 +- .../LoopVectorize/runtime-drop-crash.ll | 4 +- .../LoopVectorize/undef-inst-bug.ll | 10 +- 13 files changed, 86 insertions(+), 125 deletions(-) diff --git a/llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-cg-bug.ll b/llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-cg-bug.ll index e6b74062ad765..a33f8eb920039 100644 --- a/llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-cg-bug.ll +++ b/llvm/test/Transforms/LoopVectorize/X86/consecutive-ptr-cg-bug.ll @@ -35,7 +35,7 @@ target triple = "x86_64-unknown-linux-gnu" ; This test was originally vectorized, but now SCEV is smart enough to prove ; that its trip count is 1, so it gets ignored by vectorizer. ; Function Attrs: uwtable -define void @test_01(i1 %arg) { +define void @test_01(ptr addrspace(1) %p, i1 %arg) { br label %.outer ;