[PATCH] D116426: [InferAttrs] Add writeonly to all the math functions

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 5 01:15:05 PST 2022


mstorsjo added a comment.

I went ahead and reverted this, as it broke compilation of a couple projects for me. The breakage is reproducible with this snippet:

  $ 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!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116426/new/

https://reviews.llvm.org/D116426



More information about the llvm-commits mailing list