[PATCH] D51813: [Util] Refer to [s|z]exts of args when converting dbg.declares (fix PR35400)

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 11:20:05 PDT 2018


vsk added inline comments.


================
Comment at: llvm/test/Transforms/Util/dbg-user-of-aext.ll:43
   call void @llvm.dbg.declare(metadata i8* %b.addr, metadata !15, metadata !16), !dbg !17
-  %frombool1 = zext i1 %frag to i8
+  %frombool1 = sext i1 %frag to i8
   store i8 %frombool1, i8* %frag.addr, align 1
----------------
vsk wrote:
> aprantl wrote:
> > This is actually changing codegen. Is that intended?
> Yes, for two reasons:
> 1. The sext path wasn't covered before (afaict), and
> 2. To highlight that the prior behavior is actually incorrect specifically for sexts (see pr35400).
I think my response here may have been confusing. Just to be clear: this patch doesn't change codegen in the traditional sense (apart from changing dbg.values). The only reason I changed the zext to a sext here was to get slightly better code coverage.


https://reviews.llvm.org/D51813





More information about the llvm-commits mailing list