brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 4b157eb Raw
66 lines · plain
1# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass machine-sink -o - %s | FileCheck %s2--- |3  define i8 @g(i1 %arg) {4  else.7:5    br i1 %arg, label %then.8, label %else.8, !make.implicit !06 7  then.8:                                           ; preds = %else.8, %else.78    %merge = phi i8 [ 1, %else.7 ], [ 0, %else.8 ]9    ret i8 %merge ;1 ;%merge10 11  else.8:                                           ; preds = %else.712    %icmp.8 = icmp eq i64 undef, undef13  ;  ret i8 0 ; added14    br i1 %icmp.8, label %else.11, label %then.815 16  else.11:                                          ; preds = %else.817    ret i8 undef18  }19 20  !0 = !{}21...22---23name:            g24tracksRegLiveness: true25registers:26  - { id: 0, class: gpr32all }27  - { id: 1, class: gpr32all }28  - { id: 2, class: gpr32 }29  - { id: 3, class: gpr32 }30  - { id: 4, class: gpr32all }31  - { id: 5, class: gpr32 }32  - { id: 6, class: gpr32all }33body:             |34  ; Just check that the pass didn't crash/assert.35  ; CHECK-LABEL: name: g36  bb.0.else.7:37    successors: %bb.1, %bb.238 39    %2:gpr32 = MOVi32imm 140  ; Sinking the below COPY instruction caused an assert to trigger before41  ; requiring getMemOperandWithOffset to return false rather than assert42  ; when handling non-memory operations.43    %1:gpr32all = COPY %244    %3:gpr32 = COPY $wzr45    CBNZW %3, %bb.246    B %bb.147 48  bb.1.then.8:49    %0:gpr32all = PHI %1, %bb.0, %4, %bb.250    $w0 = COPY %051    RET_ReallyLR implicit $w052 53  bb.2.else.8:54    successors: %bb.3, %bb.155 56    %5:gpr32 = COPY $wzr57    %4:gpr32all = COPY %558    CBNZW %5, %bb.159    B %bb.360 61  bb.3.else.11:62    %6:gpr32all = IMPLICIT_DEF63    $w0 = COPY %664    RET_ReallyLR implicit $w065...66