[all-commits] [llvm/llvm-project] 89a99e: [GVN] Bug fix to reportMayClobberedLoad remark

Vir Narula via All-commits all-commits at lists.llvm.org
Wed Jul 6 17:42:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 89a99ec900d50d579629083c6400d24bd6ef6dab
      https://github.com/llvm/llvm-project/commit/89a99ec900d50d579629083c6400d24bd6ef6dab
  Author: Vir Narula <virnarula at outlook.com>
  Date:   2022-07-06 (Wed, 06 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/GVN.cpp
    A llvm/test/Transforms/GVN/remarks-selfdomination.ll

  Log Message:
  -----------
  [GVN] Bug fix to reportMayClobberedLoad remark

Bug fix to avoid assert crashing when generating remarks for GVN crashing.

Intention of assert is correct but ignores edge case of instructions being equivalent.

Reduced input that causes crash when remarks are turned on:
```
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
target triple = "arm64-apple-macosx12.0.0"

define ptr @ReplaceWithTidy(ptr %zz_hold) {
cond.end480.us:
  %0 = load ptr, ptr null, align 8
  store ptr %0, ptr %0, align 8
  store ptr null, ptr %zz_hold, align 8
  %1 = load ptr, ptr %0, align 8
  store ptr %1, ptr null, align 8
  ret ptr null
}
```

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D129235




More information about the All-commits mailing list