57 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mcpu=nehalem | FileCheck %s3target 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"4target triple = "x86_64-apple-macosx10.7"5 6; CHECK: f7;8; This function contains load / store / and operations that all can execute in9; any domain. The only domain-specific operation is the %add = shl... operation10; which is <4 x i32>.11;12; The paddd instruction can only influence the other operations through the loop13; back-edge. Check that everything is still moved into the integer domain.14 15define void @f(ptr nocapture %p, i32 %n) nounwind uwtable ssp {16; CHECK-LABEL: f:17; CHECK: ## %bb.0: ## %entry18; CHECK-NEXT: addq $16, %rdi19; CHECK-NEXT: pxor %xmm1, %xmm120; CHECK-NEXT: movdqa {{.*#+}} xmm0 = [127,127,127,127]21; CHECK-NEXT: .p2align 422; CHECK-NEXT: LBB0_1: ## %while.body23; CHECK-NEXT: ## =>This Inner Loop Header: Depth=124; CHECK-NEXT: pand %xmm0, %xmm125; CHECK-NEXT: movdqa %xmm1, -16(%rdi)26; CHECK-NEXT: movdqa (%rdi), %xmm127; CHECK-NEXT: addq $16, %rdi28; CHECK-NEXT: paddd %xmm1, %xmm129; CHECK-NEXT: decl %esi30; CHECK-NEXT: jne LBB0_131; CHECK-NEXT: ## %bb.2: ## %while.end32; CHECK-NEXT: retq33entry:34 br label %while.body35 36; Materialize a zeroinitializer and a constant-pool load in the integer domain.37; The order is not important.38 39; The instructions in the loop must all be integer domain as well.40; Finally, the controlling integer-only instruction.41while.body:42 %p.addr.04 = phi ptr [ %incdec.ptr, %while.body ], [ %p, %entry ]43 %n.addr.03 = phi i32 [ %dec, %while.body ], [ %n, %entry ]44 %x.02 = phi <4 x i32> [ %add, %while.body ], [ zeroinitializer, %entry ]45 %dec = add nsw i32 %n.addr.03, -146 %and = and <4 x i32> %x.02, <i32 127, i32 127, i32 127, i32 127>47 %incdec.ptr = getelementptr inbounds <4 x i32>, ptr %p.addr.04, i64 148 store <4 x i32> %and, ptr %p.addr.04, align 1649 %0 = load <4 x i32>, ptr %incdec.ptr, align 1650 %add = shl <4 x i32> %0, <i32 1, i32 1, i32 1, i32 1>51 %tobool = icmp eq i32 %dec, 052 br i1 %tobool, label %while.end, label %while.body53 54while.end:55 ret void56}57