[all-commits] [llvm/llvm-project] 329f81: [NFC][Clang][CodegenOpenCL] Fix test not to rely o...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Fri Jul 9 04:17:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 329f8197ef59f9bd23328b52d623ba768b51dbb2
      https://github.com/llvm/llvm-project/commit/329f8197ef59f9bd23328b52d623ba768b51dbb2
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M clang/test/CodeGenOpenCL/convergent.cl

  Log Message:
  -----------
  [NFC][Clang][CodegenOpenCL] Fix test not to rely on volatile store not being removed


  Commit: 52aeacfbf5ce5f949efe0eae029e56db171ea1f7
      https://github.com/llvm/llvm-project/commit/52aeacfbf5ce5f949efe0eae029e56db171ea1f7
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-07-09 (Fri, 09 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Utils/Local.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/CodeGen/X86/indirect-branch-tracking-eh2.ll
    M llvm/test/Transforms/InstCombine/volatile_store.ll
    M llvm/test/Transforms/SimplifyCFG/trapping-load-unreachable.ll

  Log Message:
  -----------
  Revert "Temporarily do not drop volatile stores before unreachable"

This reverts commit 4e413e16216d0c94ada2171f3c59e0a85f4fa4b6,
which landed almost 10 months ago under premise that the original behavior
didn't match reality and was breaking users, even though it was correct as per
the LangRef. But the LangRef change still hasn't appeared, which might suggest
that the affected parties aren't really worried about this problem.

Please refer to discussion in:
* https://reviews.llvm.org/D87399 (`Revert "[InstCombine] erase instructions leading up to unreachable"`)
* https://reviews.llvm.org/D53184 (`[LangRef] Clarify semantics of volatile operations.`)
* https://reviews.llvm.org/D87149 (`[InstCombine] erase instructions leading up to unreachable`)

clang has `-Wnull-dereference` which will diagnose the obvious cases
of null dereference, it was adjusted in f4877c78c0fc98be47b926439bbfe33d5e1d1b6d,
but it will only catch the cases where the pointer is a null literal,
it will not catch the cases where an arbitrary store is expected to trap.

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


Compare: https://github.com/llvm/llvm-project/compare/1440d4564f79...52aeacfbf5ce


More information about the All-commits mailing list