[PATCH] D137454: [InstCombine] Avoid passing pow attributes to sqrt

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 4 12:17:28 PDT 2022


spatel added a comment.

Please add the crashing example as a regression test. I'm not sure if we can modify an existing file to show the crash without changing a bunch of other tests, so it can be a new file in the `llvm-project/llvm/test/Transforms/InstCombine` dir.



================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:2102
   bool Ignored;
+  AttributeList Attrs; // Attributes are only meaningful on the original call
 
----------------
If we don't need the Attrs for any other transforms, it would be better to declare/init it just above the code where it is used.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137454



More information about the llvm-commits mailing list