half-constprop.ll 467 B

123456789101112131415161718
  1. ; RUN: opt < %s -O3 -S | FileCheck %s
  2. ; RUN: verify-uselistorder %s
  3. ; Testing half constant propagation.
  4. define half @abc() nounwind {
  5. entry:
  6. %a = alloca half, align 2
  7. %b = alloca half, align 2
  8. %.compoundliteral = alloca float, align 4
  9. store half 0xH4200, half* %a, align 2
  10. store half 0xH4B9A, half* %b, align 2
  11. %tmp = load half, half* %a, align 2
  12. %tmp1 = load half, half* %b, align 2
  13. %add = fadd half %tmp, %tmp1
  14. ; CHECK: 0xH4C8D
  15. ret half %add
  16. }