[all-commits] [llvm/llvm-project] c35e81: [GVN][NFC] Remove redundant check

ksyx via All-commits all-commits at lists.llvm.org
Sat Nov 13 12:59:54 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c35e8185d8c170c20e28956e0c9f3c1be895fefb
      https://github.com/llvm/llvm-project/commit/c35e8185d8c170c20e28956e0c9f3c1be895fefb
  Author: ksyx <18738953+ksyx at users.noreply.github.com>
  Date:   2021-11-13 (Sat, 13 Nov 2021)

  Changed paths:
    M llvm/lib/Transforms/Utils/VNCoercion.cpp

  Log Message:
  -----------
  [GVN][NFC] Remove redundant check

The if-check above deleted part guarantees that StoreOffset <= LoadOffset
and that StoreOffset + StoreSize >= LoadOffset + LoadSize, and given that
LoadOffset + LoadSize > LoadOffset when LoadSize > 0. Thus, this shows
StoreOffset + StoreSize > LoadOffset is guaranteed given LoadSize > 0,
while it could be meaningless to have a type with nonpositive size, so that
the check could be removed.

Part of revision D100179
Reviewed By: nikic




More information about the All-commits mailing list