[llvm] ffb2095 - CodeGenPrepare: Don't use undef base pointers in addressing mode test

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 27 07:29:37 PST 2022


Author: Matt Arsenault
Date: 2022-11-27T10:15:31-05:00
New Revision: ffb20958cdd34fc8fac4b03141a61cdf9d07c0ca

URL: https://github.com/llvm/llvm-project/commit/ffb20958cdd34fc8fac4b03141a61cdf9d07c0ca
DIFF: https://github.com/llvm/llvm-project/commit/ffb20958cdd34fc8fac4b03141a61cdf9d07c0ca.diff

LOG: CodeGenPrepare: Don't use undef base pointers in addressing mode test

This broke after the opaquify script.

Added: 
    

Modified: 
    llvm/test/Transforms/CodeGenPrepare/X86/pr35658.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/CodeGenPrepare/X86/pr35658.ll b/llvm/test/Transforms/CodeGenPrepare/X86/pr35658.ll
index bf6d02974757e..c6e819d0bf096 100644
--- a/llvm/test/Transforms/CodeGenPrepare/X86/pr35658.ll
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/pr35658.ll
@@ -1,11 +1,14 @@
 ; RUN: opt -S -codegenprepare -disable-complex-addr-modes=false -addr-sink-new-phis=true -addr-sink-new-select=true  %s | FileCheck %s
-target datalayout =
-"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+
 target triple = "x86_64-unknown-linux-gnu"
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
+
+ at gv = global [2 x i16] undef
+
 define void @f2() {
 entry:
-  %arraydecay = getelementptr inbounds [2 x i16], [2 x i16]* undef, i16 0, i16 0
-  %arrayidx1 = getelementptr inbounds [2 x i16], [2 x i16]* undef, i16 0, i16 1
+  %arraydecay = getelementptr inbounds [2 x i16], [2 x i16]* @gv, i16 0, i16 0
+  %arrayidx1 = getelementptr inbounds [2 x i16], [2 x i16]* @gv, i16 0, i16 1
   br label %for.body
 
 for.body:                                         ; preds = %for.body, %entry


        


More information about the llvm-commits mailing list