[all-commits] [llvm/llvm-project] 29b6e9: Revert "[InferAttrs] Add writeonly to all the math...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Jan 5 01:13:17 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 29b6e967f3e99ac45340ea37a70262c70e4e7528
      https://github.com/llvm/llvm-project/commit/29b6e967f3e99ac45340ea37a70262c70e4e7528
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
    M llvm/test/Transforms/InferFunctionAttrs/annotate.ll

  Log Message:
  -----------
  Revert "[InferAttrs] Add writeonly to all the math functions"

This reverts commit ea75be3d9df448b6abafaf752a8141764d93ca33 and
1eb5b6e85045d22720f177a02aaf7097930e4b4f.

That commit caused crashes with compilation e.g. like this
(not fixed by the follow-up commit):

$ cat sqrt.c
float a;
b() { sqrt(a); }
$ clang -target x86_64-linux-gnu -c -O2 sqrt.c
Attributes 'readnone and writeonly' are incompatible!
  %sqrtf = tail call float @sqrtf(float %0) #1
in function b
fatal error: error in backend: Broken function found, compilation aborted!




More information about the All-commits mailing list