Sanjay Patel | 6963244 | 2016-03-25 20:12:25 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by update_test_checks.py |
Frits van Bommel | c254966 | 2011-01-29 15:26:31 +0000 | [diff] [blame] | 2 | ; RUN: opt < %s -instsimplify -S | FileCheck %s |
| 3 | |
| 4 | define double @fdiv_of_undef(double %X) { |
Stephen Lin | c1c7a13 | 2013-07-14 01:42:54 +0000 | [diff] [blame] | 5 | ; CHECK-LABEL: @fdiv_of_undef( |
Sanjay Patel | 6963244 | 2016-03-25 20:12:25 +0000 | [diff] [blame] | 6 | ; CHECK: ret double undef |
| 7 | ; |
Frits van Bommel | c254966 | 2011-01-29 15:26:31 +0000 | [diff] [blame] | 8 | ; undef / X -> undef |
| 9 | %r = fdiv double undef, %X |
| 10 | ret double %r |
Frits van Bommel | c254966 | 2011-01-29 15:26:31 +0000 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | define double @fdiv_by_undef(double %X) { |
Stephen Lin | c1c7a13 | 2013-07-14 01:42:54 +0000 | [diff] [blame] | 14 | ; CHECK-LABEL: @fdiv_by_undef( |
Sanjay Patel | 6963244 | 2016-03-25 20:12:25 +0000 | [diff] [blame] | 15 | ; CHECK: ret double undef |
| 16 | ; |
Frits van Bommel | c254966 | 2011-01-29 15:26:31 +0000 | [diff] [blame] | 17 | ; X / undef -> undef |
| 18 | %r = fdiv double %X, undef |
| 19 | ret double %r |
Frits van Bommel | c254966 | 2011-01-29 15:26:31 +0000 | [diff] [blame] | 20 | } |