absorption.ll 295 B

1234567891011
  1. ; RUN: opt -S -reassociate < %s | FileCheck %s
  2. ; Check that if constants combine to an absorbing value then the expression is
  3. ; evaluated as the absorbing value.
  4. define i8 @foo(i8 %x) {
  5. %tmp1 = or i8 %x, 127
  6. %tmp2 = or i8 %tmp1, 128
  7. ret i8 %tmp2
  8. ; CHECK-LABEL: @foo(
  9. ; CHECK: ret i8 -1
  10. }