67 lines · plain
1; Function Attrs: nounwind2; RUN: llc < %s -mtriple=r600 -mcpu=redwood | FileCheck %s3;4; CFG flattening should use parallel-or to generate branch conditions and5; then merge if-regions with the same bodies.6 7; FIXME: For some reason having the allocas here allowed the flatten cfg pass8; to do its transformation, however now that we are using local memory for9; allocas, the transformation isn't happening.10; XFAIL: *11;12; CHECK: OR_INT13; CHECK-NEXT: OR_INT14; CHECK-NEXT: OR_INT15define amdgpu_kernel void @_Z9chk1D_512v() #0 {16entry:17 %a0 = alloca i32, align 4, addrspace(5)18 %b0 = alloca i32, align 4, addrspace(5)19 %c0 = alloca i32, align 4, addrspace(5)20 %d0 = alloca i32, align 4, addrspace(5)21 %a1 = alloca i32, align 4, addrspace(5)22 %b1 = alloca i32, align 4, addrspace(5)23 %c1 = alloca i32, align 4, addrspace(5)24 %d1 = alloca i32, align 4, addrspace(5)25 %data = alloca i32, align 4, addrspace(5)26 %0 = load i32, ptr addrspace(5) %a0, align 427 %1 = load i32, ptr addrspace(5) %b0, align 428 %cmp = icmp ne i32 %0, %129 br i1 %cmp, label %land.lhs.true, label %if.else30 31land.lhs.true: ; preds = %entry32 %2 = load i32, ptr addrspace(5) %c0, align 433 %3 = load i32, ptr addrspace(5) %d0, align 434 %cmp1 = icmp ne i32 %2, %335 br i1 %cmp1, label %if.then, label %if.else36 37if.then: ; preds = %land.lhs.true38 br label %if.end39 40if.else: ; preds = %land.lhs.true, %entry41 store i32 1, ptr addrspace(5) %data, align 442 br label %if.end43 44if.end: ; preds = %if.else, %if.then45 %4 = load i32, ptr addrspace(5) %a1, align 446 %5 = load i32, ptr addrspace(5) %b1, align 447 %cmp2 = icmp ne i32 %4, %548 br i1 %cmp2, label %land.lhs.true3, label %if.else649 50land.lhs.true3: ; preds = %if.end51 %6 = load i32, ptr addrspace(5) %c1, align 452 %7 = load i32, ptr addrspace(5) %d1, align 453 %cmp4 = icmp ne i32 %6, %754 br i1 %cmp4, label %if.then5, label %if.else655 56if.then5: ; preds = %land.lhs.true357 br label %if.end758 59if.else6: ; preds = %land.lhs.true3, %if.end60 store i32 1, ptr addrspace(5) %data, align 461 br label %if.end762 63if.end7: ; preds = %if.else6, %if.then564 ret void65}66 67