[llvm-bugs] [Bug 34036] New: NewGVN misses a load coercion opportunity

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 2 12:57:36 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34036

            Bug ID: 34036
           Summary: NewGVN misses a load coercion opportunity
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: davide at freebsd.org
          Reporter: davide at freebsd.org
                CC: dberlin at dberlin.org, filcab at gmail.com,
                    llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk,
                    simon.f.whittaker at gmail.com

This is one of the blockers to get NewGVN on by default.
I'm going to look at this soon, opening a bug in case I get sidetracked in
other activities.

The gist is that we should remove the load sandwiched between the two stores,
and currently we don't.

; ModuleID = 'pr10820.ll'
source_filename = "pr10820.ll"
target datalayout =
"e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-f128:128:128-n8:16:32:64"
target triple = "x86_64-unknown-linux-gnu"

@g = external global i31

; Function Attrs: nounwind uwtable
define void @main() #0 {
entry:
  store i32 402662078, i32* bitcast (i31* @g to i32*), align 8
  %0 = load i31, i31* @g, align 8
  store i31 %0, i31* undef, align 1
  unreachable
}

attributes #0 = { nounwind uwtable }

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170802/655ff6dc/attachment.html>


More information about the llvm-bugs mailing list