| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 6 | |
| # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -O3 -ppc-fma-rp-factor=0.0 -run-pass mir-strip-debug,machine-combiner -mir-strip-debugify-only=0 -machine-combiner-inc-threshold=11 %s -o - | FileCheck %s | |
| # RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -O3 -ppc-fma-rp-factor=0.0 -run-pass machine-combiner,mir-strip-debug -mir-strip-debugify-only=0 -machine-combiner-inc-threshold=11 %s -o - | FileCheck %s | |
| # We should get the same result when machine-combiner sees debug info as when | |
| # it does not. "-mir-strip-debugify-only=0" is needed for mir-strip-debug to | |
| # remove all debug info. "-ppc-fma-rp-factor=0.0" is needed to make | |
| # PPCInstrInfo::shouldReduceRegisterPressure return true. | |
| # | |
| # This covers the MBB->size() check in the register pressure reduction part of | |
| # MachineCombinerImpl::combineInstructions. | |
| --- | | |
| define void @test() !dbg !5 { | |
| ret void | |
| } | |
| !llvm.dbg.cu = !{!0} | |
| !llvm.module.flags = !{!2} | |
| !2 = !{i32 2, !"Debug Info Version", i32 3} | |
| !0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, emissionKind: FullDebug) | |
| !1 = !DIFile(filename: "t.c", directory: "/") | |
| !5 = distinct !DISubprogram(name: "test", scope: !1, file: !1, type: !6, spFlags: DISPFlagDefinition, unit: !0) | |
| !6 = !DISubroutineType(types: !7) | |
| !7 = !{null} | |
| !9 = !DILocation(line: 0, scope: !5) | |
| !10 = !DILocalVariable(name: "x", scope: !5) | |
| ... | |
| --- | |
| name: test | |
| tracksRegLiveness: true | |
| constants: | |
| - id: 0 | |
| value: float f0x2D9299FF | |
| alignment: 4 | |
| body: | | |
| ; CHECK-LABEL: name: test | |
| ; CHECK: bb.0: | |
| ; CHECK-NEXT: successors: %bb.1(0x80000000) | |
| ; CHECK-NEXT: liveins: $f2, $x2 | |
| ; CHECK-NEXT: {{ $}} | |
| ; CHECK-NEXT: [[COPY:%[0-9]+]]:vssrc = COPY $f2 | |
| ; CHECK-NEXT: [[XSMULSP:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMULSP [[COPY]], [[COPY]] | |
| ; CHECK-NEXT: [[XSADDSP:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSADDSP [[XSMULSP]], [[COPY]] | |
| ; CHECK-NEXT: [[XSMULSP1:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMULSP [[XSADDSP]], [[COPY]] | |
| ; CHECK-NEXT: [[ADDIStocHA8_:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, %const.0 | |
| ; CHECK-NEXT: [[DFLOADf32_:%[0-9]+]]:vssrc = DFLOADf32 target-flags(ppc-toc-lo) %const.0, [[ADDIStocHA8_]] :: (load (s32) from constant-pool) | |
| ; CHECK-NEXT: [[ADDIStocHA8_1:%[0-9]+]]:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, %const.1 | |
| ; CHECK-NEXT: [[DFLOADf32_1:%[0-9]+]]:vssrc = DFLOADf32 target-flags(ppc-toc-lo) %const.1, [[ADDIStocHA8_1]] :: (load (s32) from constant-pool) | |
| ; CHECK-NEXT: [[XSMADDASP:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMADDASP [[XSMULSP1]], [[COPY]], [[DFLOADf32_1]] | |
| ; CHECK-NEXT: [[XSMADDASP1:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMADDASP [[XSMADDASP]], [[COPY]], [[DFLOADf32_]] | |
| ; CHECK-NEXT: [[XSADDSP1:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSADDSP [[COPY]], [[COPY]] | |
| ; CHECK-NEXT: [[XSADDSP2:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSADDSP [[XSADDSP1]], [[XSADDSP]] | |
| ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vssrc = COPY [[XSMADDASP1]] | |
| ; CHECK-NEXT: {{ $}} | |
| ; CHECK-NEXT: bb.1: | |
| ; CHECK-NEXT: successors: %bb.1(0x80000000) | |
| ; CHECK-NEXT: {{ $}} | |
| ; CHECK-NEXT: [[XSADDSP3:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSADDSP [[COPY]], [[COPY]] | |
| ; CHECK-NEXT: [[XSMULSP2:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMULSP [[XSADDSP3]], [[COPY1]] | |
| ; CHECK-NEXT: [[XSMULSP3:%[0-9]+]]:vssrc = nsz reassoc nofpexcept XSMULSP [[XSMULSP2]], [[COPY]] | |
| ; CHECK-NEXT: B %bb.1 | |
| bb.0: | |
| liveins: $f2, $x2 | |
| DBG_VALUE 0, $noreg, !10, !DIExpression(), debug-location !9 | |
| %0:vssrc = COPY $f2 | |
| %1:vssrc = nsz reassoc nofpexcept XSMULSP %0, %0 | |
| %2:vssrc = nsz reassoc nofpexcept XSADDSP %1, %0 | |
| %3:vssrc = nsz reassoc nofpexcept XSMULSP %2, %0 | |
| %4:vssrc = nsz reassoc nofpexcept XSSUBSP %0, %0 | |
| %5:g8rc_and_g8rc_nox0 = ADDIStocHA8 $x2, %const.0 | |
| %6:vssrc = DFLOADf32 target-flags(ppc-toc-lo) %const.0, %5 :: (load (s32) from constant-pool) | |
| %7:vssrc = nsz reassoc nofpexcept XSMADDASP %3, %4, %6 | |
| %8:vssrc = nsz reassoc nofpexcept XSADDSP %0, %0 | |
| %9:vssrc = nsz reassoc nofpexcept XSADDSP %8, %2 | |
| %10:vssrc = COPY %7 | |
| bb.1: | |
| %11:vssrc = nsz reassoc nofpexcept XSADDSP %0, %0 | |
| %12:vssrc = nsz reassoc nofpexcept XSMULSP %11, %10 | |
| %13:vssrc = nsz reassoc nofpexcept XSMULSP %12, %0 | |
| B %bb.1 | |
| ... |