Dan Gohman | fea1dd0 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 1 | // RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null |
Tanya Lattner | e9af5d1 | 2004-11-06 22:41:00 +0000 | [diff] [blame] | 2 | |
Chris Lattner | 5f988c0 | 2002-03-14 19:27:43 +0000 | [diff] [blame] | 3 | /* This code used to break GCC's SSA computation code. It would create |
| 4 | uses of B & C that are not dominated by their definitions. See: |
| 5 | http://gcc.gnu.org/ml/gcc/2002-03/msg00697.html |
| 6 | */ |
| 7 | int bar(); |
| 8 | int foo() |
| 9 | { |
| 10 | int a,b,c; |
| 11 | |
| 12 | a = b + c; |
| 13 | b = bar(); |
| 14 | c = bar(); |
| 15 | return a + b + c; |
| 16 | } |
| 17 | |