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

            Bug ID: 46847
           Summary: [SimplifyCFG?] Common code sinking: failure to merge
                    stores to the same ptr
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

void src(uint32_t& Storage) {
  if(Storage == 1)
    Storage |= INT_MIN;
  ++Storage;
}
void tgt(uint32_t& Storage) {
  ++Storage;
  if(Storage == 2)
    Storage |= INT_MIN;
}

^ these are identical https://alive2.llvm.org/ce/z/aJN6Sz
but in the first case we fail to flatten the cfg, and merge stores

https://godbolt.org/z/8Yq9TE

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to