[PATCH] D79031: [GlobalISel] Assign the correct debug location when combining G_SEXT/G_ANYEXT/G_ZEXT

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 14:02:34 PDT 2020


paquette added a comment.

The code looks fine to me, but I think the testcase can be tidied up a bit.



================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:1
+# RUN: llc -O0 -mtriple aarch64-- -run-pass=legalizer %s -o - | FileCheck %s
+
----------------
Should this have -verify-machineinstrs?


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:8-9
+--- |
+  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
+  target triple = "arm64-apple-ios13.0.0"
+  
----------------
Probably can just remove this?


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:37-38
+  
+  !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: LineTablesOnly, nameTableKind: None, sysroot: "/Applications/Xcode2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk", sdk: "iPhoneOS13.0.sdk")
+  !1 = !DIFile(filename: "/Users/davide/stash_work/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp", directory: "/Users/davide")
+  !2 = !{i32 2, !"Debug Info Version", i32 3}
----------------
Would be nice to replace the paths with dummy paths?


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:42
+  !4 = distinct !DISubprogram(name: "main", scope: !5, file: !5, line: 19, type: !6, scopeLine: 20, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0)
+  !5 = !DIFile(filename: "stash_work/llvm-project/lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/variant/main.cpp", directory: "/Users/davide")
+  !6 = !DISubroutineType(types: !7)
----------------
Would be nice to replace this path with a dummy path?


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:51-58
+alignment:       4
+exposesReturnsTwice: false
+legalized:       false
+regBankSelected: false
+selected:        false
+failedISel:      false
+tracksRegLiveness: true
----------------
I think you can remove most of these?


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:59-73
+registers:
+  - { id: 0, class: _, preferred-register: '' }
+  - { id: 1, class: _, preferred-register: '' }
+  - { id: 2, class: _, preferred-register: '' }
+  - { id: 3, class: _, preferred-register: '' }
+  - { id: 4, class: _, preferred-register: '' }
+  - { id: 5, class: _, preferred-register: '' }
----------------
I think you can remove this too and the test should still work.


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-ext-debugloc.mir:75-93
+frameInfo:
+  isFrameAddressTaken: false
+  isReturnAddressTaken: false
+  hasStackMap:     false
+  hasPatchPoint:   false
+  stackSize:       0
+  offsetAdjustment: 0
----------------
I think you can remove all of this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79031/new/

https://reviews.llvm.org/D79031





More information about the llvm-commits mailing list