HomePhabricator

Optimize square root squared (PR21126).

Authored by spatel on Oct 2 2014, 2:10 PM.

Description

Optimize square root squared (PR21126).

When unsafe-fp-math is enabled, we can turn sqrt(X) * sqrt(X) into X.

This can happen in the real world when calculating x ** 3/2. This occurs
in test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c.

Differential Revision: http://reviews.llvm.org/D5584

llvm-svn: 218906

Details

Committed
spatelOct 2 2014, 2:10 PM
Differential Revision
D5584: Optimize square root squared (PR21126)
Parents
rGd2208b59cfaa: Add __sync_fetch_and_nand (again)
Branches
Unknown
Tags
Unknown