brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 2fb4df2 Raw
70 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=aarch64-unknown-unknown -verify-machineinstrs -run-pass=instruction-select -global-isel-abort=1 %s -o - | FileCheck %s3---4name:            fold_ror_eor5alignment:       46legalized:       true7regBankSelected: true8tracksRegLiveness: true9liveins:10  - { reg: '$w0' }11body:             |12  bb.1.entry:13    liveins: $w014 15    ; Our codegen differs from SDAG here, we decide to fold in LHS16    ; operand instead of RHS since they're both rotates and XOR is commutative.17    ; Either is valid.18 19    ; CHECK-LABEL: name: fold_ror_eor20    ; CHECK: liveins: $w021    ; CHECK-NEXT: {{  $}}22    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w023    ; CHECK-NEXT: [[EXTRWrri:%[0-9]+]]:gpr32 = EXTRWrri [[COPY]], [[COPY]], 1124    ; CHECK-NEXT: [[EORWrs:%[0-9]+]]:gpr32 = EORWrs [[EXTRWrri]], [[COPY]], 19825    ; CHECK-NEXT: $w0 = COPY [[EORWrs]]26    ; CHECK-NEXT: RET_ReallyLR implicit $w027    %0:gpr(s32) = COPY $w028    %13:gpr(s64) = G_CONSTANT i64 629    %2:gpr(s32) = G_ROTR %0, %13(s64)30    %14:gpr(s64) = G_CONSTANT i64 1131    %4:gpr(s32) = G_ROTR %0, %14(s64)32    %5:gpr(s32) = G_XOR %2, %433    $w0 = COPY %5(s32)34    RET_ReallyLR implicit $w035 36...37---38name:            fold_ror_eor_rhs_only39alignment:       440legalized:       true41regBankSelected: true42tracksRegLiveness: true43liveins:44  - { reg: '$w0' }45  - { reg: '$w1' }46frameInfo:47  maxAlignment:    148machineFunctionInfo: {}49body:             |50  bb.1.entry:51    liveins: $w0, $w152 53    ; CHECK-LABEL: name: fold_ror_eor_rhs_only54    ; CHECK: liveins: $w0, $w155    ; CHECK-NEXT: {{  $}}56    ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr32 = COPY $w057    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr32 = COPY $w158    ; CHECK-NEXT: [[EORWrs:%[0-9]+]]:gpr32 = EORWrs [[COPY1]], [[COPY]], 19859    ; CHECK-NEXT: $w0 = COPY [[EORWrs]]60    ; CHECK-NEXT: RET_ReallyLR implicit $w061    %0:gpr(s32) = COPY $w062    %1:gpr(s32) = COPY $w163    %9:gpr(s64) = G_CONSTANT i64 664    %3:gpr(s32) = G_ROTR %0, %9(s64)65    %4:gpr(s32) = G_XOR %1, %366    $w0 = COPY %4(s32)67    RET_ReallyLR implicit $w068 69...70