From 69156b4c20249e7800cc09e0eef0beb3d15ac1ad Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 6 Sep 2015 18:34:38 +0000 Subject: Import llvm 3.7.0 release (r246257). --- test/Analysis/BasicAA/gep-alias.ll | 48 ++ test/Analysis/BasicAA/phi-aa.ll | 1 - test/Analysis/BasicAA/zext.ll | 209 ------- test/CodeGen/AMDGPU/cgp-addressing-modes.ll | 16 +- test/CodeGen/AMDGPU/global_atomics.ll | 280 ++++++--- test/CodeGen/AMDGPU/gv-const-addrspace.ll | 12 +- test/CodeGen/AMDGPU/llvm.AMDGPU.fract.f64.ll | 12 +- test/CodeGen/AMDGPU/private-memory.ll | 2 +- test/CodeGen/AMDGPU/scratch-buffer.ll | 51 +- test/CodeGen/AMDGPU/smrd.ll | 8 +- test/CodeGen/ARM/ldrd.ll | 56 +- test/CodeGen/Mips/Fast-ISel/br1.ll | 4 +- test/CodeGen/Mips/Fast-ISel/bswap1.ll | 4 +- test/CodeGen/Mips/Fast-ISel/callabi.ll | 4 +- test/CodeGen/Mips/Fast-ISel/constexpr-address.ll | 4 +- test/CodeGen/Mips/Fast-ISel/div1.ll | 4 +- test/CodeGen/Mips/Fast-ISel/fastalloca.ll | 2 +- test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll | 15 + test/CodeGen/Mips/Fast-ISel/fpcmpa.ll | 4 +- test/CodeGen/Mips/Fast-ISel/fpext.ll | 4 +- test/CodeGen/Mips/Fast-ISel/fpintconv.ll | 4 +- test/CodeGen/Mips/Fast-ISel/fptrunc.ll | 4 +- test/CodeGen/Mips/Fast-ISel/icmpa.ll | 4 +- test/CodeGen/Mips/Fast-ISel/loadstore2.ll | 4 +- test/CodeGen/Mips/Fast-ISel/loadstoreconv.ll | 8 +- test/CodeGen/Mips/Fast-ISel/loadstrconst.ll | 4 +- test/CodeGen/Mips/Fast-ISel/logopm.ll | 24 +- test/CodeGen/Mips/Fast-ISel/memtest1.ll | 4 +- test/CodeGen/Mips/Fast-ISel/mul1.ll | 6 +- test/CodeGen/Mips/Fast-ISel/nullvoid.ll | 4 +- test/CodeGen/Mips/Fast-ISel/overflt.ll | 4 +- test/CodeGen/Mips/Fast-ISel/rem1.ll | 4 +- test/CodeGen/Mips/Fast-ISel/retabi.ll | 2 +- test/CodeGen/Mips/Fast-ISel/sel1.ll | 20 +- test/CodeGen/Mips/Fast-ISel/shftopm.ll | 4 +- test/CodeGen/Mips/Fast-ISel/shift.ll | 2 +- test/CodeGen/Mips/Fast-ISel/simplestore.ll | 4 +- test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll | 8 +- test/CodeGen/Mips/Fast-ISel/simplestorei.ll | 11 +- test/CodeGen/Mips/delay-slot-kill.ll | 2 + test/CodeGen/Mips/emergency-spill-slot-near-fp.ll | 10 +- test/CodeGen/Mips/llvm-ir/and.ll | 5 +- test/CodeGen/Mips/llvm-ir/or.ll | 6 +- test/CodeGen/Mips/llvm-ir/xor.ll | 5 +- test/CodeGen/PowerPC/fp2int2fp-ppcfp128.ll | 16 + test/CodeGen/PowerPC/ppc64-patchpoint.ll | 15 + test/CodeGen/PowerPC/pr24216.ll | 14 + test/CodeGen/PowerPC/vec_shuffle_le.ll | 2 +- test/CodeGen/PowerPC/vsx.ll | 69 ++- test/CodeGen/PowerPC/vsx_insert_extract_le.ll | 8 +- test/CodeGen/PowerPC/xvcmpeqdp-v2f64.ll | 38 ++ test/CodeGen/SystemZ/args-04.ll | 14 + test/CodeGen/SystemZ/args-07.ll | 60 ++ test/CodeGen/SystemZ/args-08.ll | 57 ++ test/CodeGen/SystemZ/vec-args-06.ll | 83 +++ test/CodeGen/SystemZ/vec-args-07.ll | 47 ++ test/CodeGen/X86/fdiv-combine.ll | 19 + test/CodeGen/X86/machine-trace-metrics-crash.ll | 62 ++ test/CodeGen/X86/pr2656.ll | 32 +- test/CodeGen/X86/sse-fcopysign.ll | 32 +- test/CodeGen/X86/vec_fabs.ll | 4 +- test/DebugInfo/Mips/delay-slot.ll | 14 +- test/MC/AMDGPU/vopc.s | 26 +- test/MC/Disassembler/PowerPC/ppc64le-encoding.txt | 664 +++++++++++++++++++++ test/MC/X86/intel-syntax.s | 14 + test/Object/archive-extract.test | 2 +- test/Transforms/GVN/pr24397.ll | 18 + test/Transforms/InstCombine/pr24354.ll | 33 + test/Transforms/InstCombine/vector-casts.ll | 11 + .../InstSimplify/2011-09-05-InsertExtractValue.ll | 10 + test/Transforms/SROA/basictest.ll | 10 +- test/Transforms/SROA/big-endian.ll | 123 ++++ test/Transforms/SROA/phi-and-select.ll | 18 +- test/Transforms/Scalarizer/cache-bug.ll | 30 + 74 files changed, 1886 insertions(+), 552 deletions(-) delete mode 100644 test/Analysis/BasicAA/zext.ll create mode 100644 test/CodeGen/Mips/Fast-ISel/fastcc-miss.ll create mode 100644 test/CodeGen/PowerPC/fp2int2fp-ppcfp128.ll create mode 100644 test/CodeGen/PowerPC/pr24216.ll create mode 100644 test/CodeGen/PowerPC/xvcmpeqdp-v2f64.ll create mode 100644 test/CodeGen/SystemZ/args-07.ll create mode 100644 test/CodeGen/SystemZ/args-08.ll create mode 100644 test/CodeGen/SystemZ/vec-args-06.ll create mode 100644 test/CodeGen/SystemZ/vec-args-07.ll create mode 100644 test/CodeGen/X86/machine-trace-metrics-crash.ll create mode 100644 test/MC/Disassembler/PowerPC/ppc64le-encoding.txt create mode 100644 test/Transforms/GVN/pr24397.ll create mode 100644 test/Transforms/InstCombine/pr24354.ll create mode 100644 test/Transforms/Scalarizer/cache-bug.ll (limited to 'test') diff --git a/test/Analysis/BasicAA/gep-alias.ll b/test/Analysis/BasicAA/gep-alias.ll index f686010f9ead..1e435af2f12f 100644 --- a/test/Analysis/BasicAA/gep-alias.ll +++ b/test/Analysis/BasicAA/gep-alias.ll @@ -228,3 +228,51 @@ define i32 @test12(i32 %x, i32 %y, i8* %p) nounwind { ; CHECK-LABEL: @test12( ; CHECK: ret i32 %r } + +@P = internal global i32 715827882, align 4 +@Q = internal global i32 715827883, align 4 +@.str = private unnamed_addr constant [7 x i8] c"%u %u\0A\00", align 1 + +; Make sure we recognize that u[0] and u[Global + Cst] may alias +; when the addition has wrapping semantic. +; PR24468. +; CHECK-LABEL: @test13( +; Make sure the stores appear before the related loads. +; CHECK: store i8 42, +; CHECK: store i8 99, +; Find the loads and make sure they are used in the arguments to the printf. +; CHECK: [[T0ADDR:%[a-zA-Z0-9_]+]] = getelementptr inbounds [3 x i8], [3 x i8]* %t, i32 0, i32 0 +; CHECK: [[T0:%[a-zA-Z0-9_]+]] = load i8, i8* [[T0ADDR]], align 1 +; CHECK: [[T0ARG:%[a-zA-Z0-9_]+]] = zext i8 [[T0]] to i32 +; CHECK: [[U0ADDR:%[a-zA-Z0-9_]+]] = getelementptr inbounds [3 x i8], [3 x i8]* %u, i32 0, i32 0 +; CHECK: [[U0:%[a-zA-Z0-9_]+]] = load i8, i8* [[U0ADDR]], align 1 +; CHECK: [[U0ARG:%[a-zA-Z0-9_]+]] = zext i8 [[U0]] to i32 +; CHECK: call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i32 [[T0ARG]], i32 [[U0ARG]]) +; CHECK: ret +define void @test13() { +entry: + %t = alloca [3 x i8], align 1 + %u = alloca [3 x i8], align 1 + %tmp = load i32, i32* @P, align 4 + %tmp1 = mul i32 %tmp, 3 + %mul = add i32 %tmp1, -2147483646 + %idxprom = zext i32 %mul to i64 + %arrayidx = getelementptr inbounds [3 x i8], [3 x i8]* %t, i64 0, i64 %idxprom + store i8 42, i8* %arrayidx, align 1 + %tmp2 = load i32, i32* @Q, align 4 + %tmp3 = mul i32 %tmp2, 3 + %mul2 = add i32 %tmp3, 2147483647 + %idxprom3 = zext i32 %mul2 to i64 + %arrayidx4 = getelementptr inbounds [3 x i8], [3 x i8]* %u, i64 0, i64 %idxprom3 + store i8 99, i8* %arrayidx4, align 1 + %arrayidx5 = getelementptr inbounds [3 x i8], [3 x i8]* %t, i64 0, i64 0 + %tmp4 = load i8, i8* %arrayidx5, align 1 + %conv = zext i8 %tmp4 to i32 + %arrayidx6 = getelementptr inbounds [3 x i8], [3 x i8]* %u, i64 0, i64 0 + %tmp5 = load i8, i8* %arrayidx6, align 1 + %conv7 = zext i8 %tmp5 to i32 + %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %conv, i32 %conv7) + ret void +} + +declare i32 @printf(i8*, ...) diff --git a/test/Analysis/BasicAA/phi-aa.ll b/test/Analysis/BasicAA/phi-aa.ll index 3944e9e43566..a72778277bb2 100644 --- a/test/Analysis/BasicAA/phi-aa.ll +++ b/test/Analysis/BasicAA/phi-aa.ll @@ -39,7 +39,6 @@ return: ; CHECK-LABEL: pr18068 ; CHECK: MayAlias: i32* %0, i32* %arrayidx5 -; CHECK: NoAlias: i32* %arrayidx13, i32* %arrayidx5 define i32 @pr18068(i32* %jj7, i32* %j) { entry: diff --git a/test/Analysis/BasicAA/zext.ll b/test/Analysis/BasicAA/zext.ll deleted file mode 100644 index ed3565640251..000000000000 --- a/test/Analysis/BasicAA/zext.ll +++ /dev/null @@ -1,209 +0,0 @@ -; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | 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-n8:16:32:64-S128" -target triple = "x86_64-unknown-linux-gnu" - -; CHECK-LABEL: test_with_zext -; CHECK: NoAlias: i8* %a, i8* %b - -define void @test_with_zext() { - %1 = tail call i8* @malloc(i64 120) - %a = getelementptr inbounds i8, i8* %1, i64 8 - %2 = getelementptr inbounds i8, i8* %1, i64 16 - %3 = zext i32 3 to i64 - %b = getelementptr inbounds i8, i8* %2, i64 %3 - ret void -} - -; CHECK-LABEL: test_with_lshr -; CHECK: NoAlias: i8* %a, i8* %b - -define void @test_with_lshr(i64 %i) { - %1 = tail call i8* @malloc(i64 120) - %a = getelementptr inbounds i8, i8* %1, i64 8 - %2 = getelementptr inbounds i8, i8* %1, i64 16 - %3 = lshr i64 %i, 2 - %b = getelementptr inbounds i8, i8* %2, i64 %3 - ret void -} - -; CHECK-LABEL: test_with_a_loop -; CHECK: NoAlias: i8* %a, i8* %b - -define void @test_with_a_loop(i8* %mem) { - br label %for.loop - -for.loop: - %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ] - %a = getelementptr inbounds i8, i8* %mem, i64 8 - %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16 - %i.64 = zext i32 %i to i64 - %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64 - %i.plus1 = add nuw nsw i32 %i, 1 - %cmp = icmp eq i32 %i.plus1, 10 - br i1 %cmp, label %for.loop.exit, label %for.loop - -for.loop.exit: - ret void -} - -; CHECK-LABEL: test_with_varying_base_pointer_in_loop -; CHECK: NoAlias: i8* %a, i8* %b - -define void @test_with_varying_base_pointer_in_loop(i8* %mem.orig) { - br label %for.loop - -for.loop: - %mem = phi i8* [ %mem.orig, %0 ], [ %mem.plus1, %for.loop ] - %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ] - %a = getelementptr inbounds i8, i8* %mem, i64 8 - %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16 - %i.64 = zext i32 %i to i64 - %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64 - %i.plus1 = add nuw nsw i32 %i, 1 - %mem.plus1 = getelementptr inbounds i8, i8* %mem, i64 8 - %cmp = icmp eq i32 %i.plus1, 10 - br i1 %cmp, label %for.loop.exit, label %for.loop - -for.loop.exit: - ret void -} - -; CHECK-LABEL: test_sign_extension -; CHECK: PartialAlias: i64* %b.i64, i8* %a - -define void @test_sign_extension(i32 %p) { - %1 = tail call i8* @malloc(i64 120) - %p.64 = zext i32 %p to i64 - %a = getelementptr inbounds i8, i8* %1, i64 %p.64 - %p.minus1 = add i32 %p, -1 - %p.minus1.64 = zext i32 %p.minus1 to i64 - %b.i8 = getelementptr inbounds i8, i8* %1, i64 %p.minus1.64 - %b.i64 = bitcast i8* %b.i8 to i64* - ret void -} - -; CHECK-LABEL: test_fe_tools -; CHECK: PartialAlias: i32* %a, i32* %b - -define void @test_fe_tools([8 x i32]* %values) { - br label %reorder - -for.loop: - %i = phi i32 [ 0, %reorder ], [ %i.next, %for.loop ] - %idxprom = zext i32 %i to i64 - %b = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 %idxprom - %i.next = add nuw nsw i32 %i, 1 - %1 = icmp eq i32 %i.next, 10 - br i1 %1, label %for.loop.exit, label %for.loop - -reorder: - %a = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 1 - br label %for.loop - -for.loop.exit: - ret void -} - -@b = global i32 0, align 4 -@d = global i32 0, align 4 - -; CHECK-LABEL: test_spec2006 -; CHECK: PartialAlias: i32** %x, i32** %y - -define void @test_spec2006() { - %h = alloca [1 x [2 x i32*]], align 16 - %d.val = load i32, i32* @d, align 4 - %d.promoted = sext i32 %d.val to i64 - %1 = icmp slt i32 %d.val, 2 - br i1 %1, label %.lr.ph, label %3 - -.lr.ph: ; preds = %0 - br label %2 - -;