LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 37715 - GuardWidening: test/Transforms/GuardWidening/range-check-merging.ll looks different with debug info present
Summary: GuardWidening: test/Transforms/GuardWidening/range-check-merging.ll looks dif...
Status: NEW
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks: 37728
  Show dependency tree
 
Reported: 2018-06-06 12:19 PDT by Vedant Kumar
Modified: 2019-09-26 07:03 PDT (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vedant Kumar 2018-06-06 12:19:29 PDT
Running `opt -O1` on this file produces different output with/without debug info present. To reproduce the issue, do:

# Baseline
$ $OPT -O1 $FILE -S -o -

# With debug info
$ $OPT -O1 $FILE -o - -debugify-each -debugify-quiet | $OPT -strip -S

Comparing: -O1 test/Transforms/GuardWidening/range-check-merging.ll
  Baseline: /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.C74Q3eA7
  With DI : /var/folders/j8/t4w0bp8j6x1g6fpghkcb4sjm0000gp/T/tmp.7O0SBoIr
8a9
>   call void (i1, ...) @llvm.experimental.guard(i1 %4) [ "deopt"() ]
11,18c12,18
<   %7 = and i1 %4, %6
<   call void (i1, ...) @llvm.experimental.guard(i1 %7) [ "deopt"() ]
<   %8 = add i32 %0, 2
<   %9 = icmp ult i32 %8, %3
<   %10 = add i32 %0, 3
<   %11 = icmp ult i32 %10, %3
<   %12 = and i1 %9, %11
<   call void (i1, ...) @llvm.experimental.guard(i1 %12) [ "deopt"() ]
---
>   call void (i1, ...) @llvm.experimental.guard(i1 %6) [ "deopt"() ]
>   %7 = add i32 %0, 2
>   %8 = icmp ult i32 %7, %3
>   call void (i1, ...) @llvm.experimental.guard(i1 %8) [ "deopt"() ]
>   %9 = add i32 %0, 3
>   %10 = icmp ult i32 %9, %3
>   call void (i1, ...) @llvm.experimental.guard(i1 %10) [ "deopt"() ]
24a25
>   call void (i1, ...) @llvm.experimental.guard(i1 %4) [ "deopt"() ]
27,34c28,34
<   %7 = and i1 %4, %6
<   call void (i1, ...) @llvm.experimental.guard(i1 %7) [ "deopt"() ]
<   %8 = add i32 %0, 3
<   %9 = icmp ult i32 %8, %3
<   %10 = add i32 %0, 6
<   %11 = icmp ult i32 %10, %3
<   %12 = and i1 %9, %11
<   call void (i1, ...) @llvm.experimental.guard(i1 %12) [ "deopt"() ]
...
(snipped)
Comment 1 Chris Ye 2019-09-26 06:00:25 PDT
Does this issue still exist? I could not reproduce it.
Comment 2 Chris Ye 2019-09-26 07:03:59 PDT
Seems the issue could be fixed by https://reviews.llvm.org/D68004.
The same root cause with Bug 37714