[InstCombine] Avoid passing pow attributes to sqrt
authorMiguel Saldivar <saldivarcher@gmail.com>
Mon, 7 Nov 2022 16:26:30 +0000 (11:26 -0500)
committerSanjay Patel <spatel@rotateright.com>
Mon, 7 Nov 2022 17:07:37 +0000 (12:07 -0500)
commitde36d39e24249feabe18f845b1868a16b798110a
tree2ae7409c858ddb291b03b2db787f919079b7b492
parentb62c81b836512a5d38717f47d18ef5ddf32c3e2a
[InstCombine] Avoid passing pow attributes to sqrt

As described in issue #58475, we could pass the attributes of pow to sqrt and crash.

Differential Revision: https://reviews.llvm.org/D137454
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/pow-to-sqrt.ll [new file with mode: 0644]