brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 70b1329 Raw
54 lines · plain
1# RUN: llc -mtriple=powerpc64le--linux-gnu -start-before ppc-mi-peepholes %s -o - -verify-machineinstrs | FileCheck %s2# RUN: llc -mtriple=powerpc64le--linux-gnu -run-pass ppc-mi-peepholes %s -o - -verify-machineinstrs | FileCheck %s --check-prefix=CHECK-PASS3 4# The differential revision https://reviews.llvm.org/D60402 was supposed to5# collapse RLDICL/RLDICR into RLDIC when possible, but it missed removing the6# RLDICL instruction. This test case tests the fix for the bug.7 8--- |9  ; ModuleID = 'jump-tables-collapse-rotate-remove-SrcMI.ll'10  source_filename = "jump-tables-collapse-rotate-remove-SrcMI.ll"11  target datalayout = "e-m:e-i64:64-n32:64"12 13  define dso_local i64 @test(i64 %a, i64 %b) local_unnamed_addr {14  entry:15    %add = add nsw i64 %b, %a16    ret i64 %add17  }18 19...20---21name:            test22alignment:       1623tracksRegLiveness: true24registers:25  - { id: 0, class: g8rc }26  - { id: 1, class: g8rc }27  - { id: 2, class: g8rc }28liveins:29  - { reg: '$x3', virtual-reg: '%0' }30  - { reg: '$x4', virtual-reg: '%1' }31frameInfo:32  maxAlignment:    133machineFunctionInfo: {}34body:             |35  bb.0.entry:36    liveins: $x3, $x437 38    %1:g8rc = COPY $x439    %0:g8rc = COPY $x340    %2:g8rc = RLDICL killed %1, 0, 3241    %3:g8rc = RLDICR %2, 2, 6142    $x3 = COPY %343    BLR8 implicit $lr8, implicit $rm, implicit $x344 45...46# CHECK-LABEL: test:47# CHECK: # %bb.0: # %entry48# CHECK-NEXT: 	rldic 3, 4, 2, 3049# CHECK-NEXT: 	blr50#51# CHECK-PASS-NOT:     %2:g8rc = RLDICL killed %1, 0, 3252# CHECK-PASS-NOT:     %3:g8rc = RLDICR %2, 2, 6153# CHECK-PASS:     %3:g8rc = RLDIC killed %1, 2, 3054