[LLVMdev] TSVC/Equivalencing-dbl

Duncan Sands baldrick at free.fr
Fri Oct 5 13:08:38 PDT 2012

PS: Here's how I can reproduce with clang on linux:

clang -S -o tsc.ll -O0 -flto -std=gnu99 tsc.c ; clang -S -o dummy.ll -O0 -flto 
-std=gnu99 dummy.c ; opt -std-compile-opts tsc.ll -S -o tsc.1.ll ; opt 
-std-compile-opts dummy.ll -S -o dummy.1.ll ; llvm-link tsc.1.ll dummy.1.ll -S 
-o total.ll ; opt -std-link-opts total.ll -S -o total.1.ll ; llc total.1.ll ; 
gcc -o z total.1.s

The program z shows the problem.  Note that it is essential to have clang use
-O0 (not -O3).

Ciao, Duncan.

More information about the llvm-dev mailing list