Duncan Sands | 409d8ae | 2012-06-13 12:15:56 +0000 | [diff] [blame] | 1 | ; RUN: opt -S -reassociate < %s | FileCheck %s |
2 | |||||
3 | ; Check that if constants combine to an absorbing value then the expression is | ||||
4 | ; evaluated as the absorbing value. | ||||
5 | define i8 @foo(i8 %x) { | ||||
6 | %tmp1 = or i8 %x, 127 | ||||
7 | %tmp2 = or i8 %tmp1, 128 | ||||
8 | ret i8 %tmp2 | ||||
Stephen Lin | c1c7a13 | 2013-07-14 01:42:54 +0000 | [diff] [blame] | 9 | ; CHECK-LABEL: @foo( |
Duncan Sands | 409d8ae | 2012-06-13 12:15:56 +0000 | [diff] [blame] | 10 | ; CHECK: ret i8 -1 |
11 | } |