brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 478042f Raw
50 lines · plain
1; Remove 'S' Scalar Dependencies #1193452; Scalar dependencies are not handled correctly, so they were removed to avoid3; miscompiles. The loop nest in this test case used to be interchanged, but it's4; no longer triggering. XFAIL'ing this test to indicate that this test should5; interchanged if scalar deps are handled correctly.6;7; XFAIL: *8 9; RUN: opt -passes=loop-interchange -cache-line-size=64 -loop-interchange-threshold=-10 %s -pass-remarks-output=%t -disable-output10; RUN: FileCheck -input-file %t %s11 12; The test contains a GEP with an operand that is not SCEV-able. Make sure13; loop-interchange does not crash.14;15; CHECK:       --- !Passed16; CHECK-NEXT:  Pass:            loop-interchange17; CHECK-NEXT:  Name:            Interchanged18; CHECK-NEXT:  Function:        test19; CHECK-NEXT:  Args:20; CHECK-NEXT:    - String:          Loop interchanged with enclosing loop.21 22define void @test(ptr noalias %src, ptr %dst) {23entry:24  br label %outer.header25 26outer.header:27  %i = phi i32 [ %i.next, %outer.latch ], [ 0, %entry ]28  br label %inner29 30inner:31  %j = phi i64 [ 0, %outer.header ], [ %j.next, %inner ]32  %src.gep = getelementptr inbounds [256 x float], ptr %src, <2 x i64> <i64 0, i64 1>, i64 %j33  %src.0 = extractelement <2 x ptr> %src.gep, i32 034  %lv.0 = load float, ptr %src.035  %add.0 = fadd float %lv.0, 1.036  %dst.gep = getelementptr inbounds float, ptr %dst, i64 %j37  store float %add.0, ptr %dst.gep38  %j.next = add nuw nsw i64 %j, 139  %inner.exitcond = icmp eq i64 %j.next, 10040  br i1 %inner.exitcond, label %outer.latch, label %inner41 42outer.latch:43  %i.next = add nuw nsw i32 %i, 144  %outer.exitcond = icmp eq i32 %i.next, 10045  br i1 %outer.exitcond, label %exit, label %outer.header46 47exit:48  ret void49}50