brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 4cf3633 Raw
100 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple=aarch64 < %s | FileCheck %s2; RUN: llc -verify-machineinstrs -mtriple=aarch64 -cgp-verify-bfi-updates=true < %s | FileCheck %s3 4; CHECK-LABEL: test15; CHECK: tbz {{w[0-9]}}, #3, {{.LBB0_3}}6; CHECK: tbz w[[REG1:[0-9]+]], #2, {{.LBB0_3}}7; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]], #0x48; CHECK-NOT: cbz x{{[0-9]+}}, .LBB0_39 10; CHECK: b11define void @test1(i64 %A, i64 %B) {12entry:13  %and = and i64 %A, 414  %notlhs = icmp eq i64 %and, 015  %and.1 = and i64 %B, 816  %0 = icmp eq i64 %and.1, 017  %1 = or i1 %0, %notlhs18  br i1 %1, label %if.end3, label %if.then219 20if.then2:                                         ; preds = %entry21  tail call void @foo(i64 %A, i64 %B)22  br label %if.end323 24if.end3:                                          ; preds = %if.then2, %entry25  ret void26}27 28; CHECK-LABEL: test229; CHECK: cbz {{x[0-9]}}, {{.LBB1_3}}30; CHECK: tbz w[[REG1:[0-9]+]], #3, {{.LBB1_3}}31; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]], #0x0832; CHECK-NOT: cbz x{{[0-9]+}}, .LBB1_333 34define void @test2(i64 %A, ptr readonly %B) #0 {35entry:36  %tobool = icmp eq ptr %B, null37  %and = and i64 %A, 838  %tobool1 = icmp eq i64 %and, 039  %or.cond = or i1 %tobool, %tobool140  br i1 %or.cond, label %if.end3, label %if.then241 42if.then2:                                         ; preds = %entry43  %0 = load i64, ptr %B, align 444  tail call void @foo(i64 %A, i64 %0)45  br label %if.end346 47if.end3:                                          ; preds = %entry, %if.then248  ret void49}50 51; Make sure we use the W variant when log2(mask) is < 32.52; CHECK-LABEL: test353; CHECK: tbz {{w[0-9]}}, #3, {{.LBB2_3}}54; CHECK: tbz w[[REG1:[0-9]+]], #28, {{.LBB2_3}}55; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]]56; CHECK-NOT: cbz x{{[0-9]+}}, .LBB2_357define void @test3(i64 %A, i64 %B) {58entry:59  %shift = shl i64 1, 2860  %and = and i64 %A, %shift61  %notlhs = icmp eq i64 %and, 062  %and.1 = and i64 %B, 863  %0 = icmp eq i64 %and.1, 064  %1 = or i1 %0, %notlhs65  br i1 %1, label %if.then2, label %if.end366 67if.then2:                                         ; preds = %entry68  tail call void @foo(i64 %A, i64 %B)69  br label %if.end370 71if.end3:                                          ; preds = %if.then2, %entry72  ret void73}74 75; CHECK-LABEL: test476; CHECK: tbz {{w[0-9]}}, #3, {{.LBB3_3}}77; CHECK: tbz [[REG1:x[0-9]+]], #35, {{.LBB3_3}}78; CHECK-NOT: and x{{[0-9]+}}, x[[REG1]]79; CHECK-NOT: cbz x{{[0-9]+}}, .LBB2_380define void @test4(i64 %A, i64 %B) {81entry:82  %shift = shl i64 1, 3583  %and = and i64 %A, %shift84  %notlhs = icmp eq i64 %and, 085  %and.1 = and i64 %B, 886  %0 = icmp eq i64 %and.1, 087  %1 = or i1 %0, %notlhs88  br i1 %1, label %if.then2, label %if.end389 90if.then2:                                         ; preds = %entry91  tail call void @foo(i64 %A, i64 %B)92  br label %if.end393 94if.end3:                                          ; preds = %if.then2, %entry95  ret void96}97 98 99declare void @foo(i64, i64)100