[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
Fri Sep 7 14:03:35 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
----------------
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).


https://reviews.llvm.org/D51813





More information about the llvm-commits mailing list