X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FREADME.txt;h=bf8d465d0aeebe9db2b1a2e5375fef188fa8853c;hb=fa2dfaedf2015df7c8a9426febf59c374491eb42;hp=a9aab86abdacb830e02f8c364723e8ed94f25541;hpb=200e2370dc1b9216bbf1320ed7c14f9f035a6bd6;p=oota-llvm.git diff --git a/lib/Target/README.txt b/lib/Target/README.txt index a9aab86abda..bf8d465d0ae 100644 --- a/lib/Target/README.txt +++ b/lib/Target/README.txt @@ -93,44 +93,6 @@ This requires reassociating to forms of expressions that are already available, something that reassoc doesn't think about yet. -//===---------------------------------------------------------------------===// - -This function: (derived from GCC PR19988) -double foo(double x, double y) { - return ((x + 0.1234 * y) * (x + -0.1234 * y)); -} - -compiles to: -_foo: - movapd %xmm1, %xmm2 - mulsd LCPI1_1(%rip), %xmm1 - mulsd LCPI1_0(%rip), %xmm2 - addsd %xmm0, %xmm1 - addsd %xmm0, %xmm2 - movapd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - ret - -Reassociate should be able to turn it into: - -double foo(double x, double y) { - return ((x + 0.1234 * y) * (x - 0.1234 * y)); -} - -Which allows the multiply by constant to be CSE'd, producing: - -_foo: - mulsd LCPI1_0(%rip), %xmm1 - movapd %xmm1, %xmm2 - addsd %xmm0, %xmm2 - subsd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - ret - -This doesn't need -ffast-math support at all. This is particularly bad because -the llvm-gcc frontend is canonicalizing the later into the former, but clang -doesn't have this problem. - //===---------------------------------------------------------------------===// These two functions should generate the same code on big-endian systems: @@ -1163,7 +1125,7 @@ There are many load PRE testcases in testsuite/gcc.dg/tree-ssa/loadpre* in the GCC testsuite, ones we don't get yet are (checked through loadpre25): [CRIT EDGE BREAKING] -loadpre3.c predcom-4.c +predcom-4.c [PRE OF READONLY CALL] loadpre5.c