[PATCH] D81437: [CGP] Reset the debug location when promoting zext(s)

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 16 15:56:20 PDT 2020


vsk added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:5809
-    // part of the load. Therefore we conservatively reuse the same debug
-    // location for the load and the zext.
-    ExtFedByLoad->setDebugLoc(LI->getDebugLoc());
----------------
Might be worth moving parts of this comment near the TypePromotionTransaction definition, to justify why those clear the IRBuilder debug loc?


================
Comment at: llvm/test/DebugInfo/X86/zextload.ll:26
 ; CHECK:   [[LOADVAL:%[0-9]+]] = load i32, i32* %ptr, align 4, !dbg [[DEBUGLOC:![0-9]+]]
-; CHECK-NEXT:                    zext i32 [[LOADVAL]] to i64, !dbg [[DEBUGLOC]]
+; CHECK-NEXT:                    zext i32 [[LOADVAL]] to i64
 ; CHECK:   [[DEBUGLOC]] = !DILocation(line: 3
----------------
{{$}}?


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

https://reviews.llvm.org/D81437





More information about the llvm-commits mailing list