<commit_before>; RUN: opt < %s -instcombine -S | grep 0.0 | count 1

declare double @abs(double)

define double @test(double %X) {
  %Y = fadd double %X, 0.0          ;; Should be a single add x, 0.0
  %Z = fadd double %Y, 0.0
  ret double %Z
}

define double @test1(double %X) {
  %Y = call double @abs(double %X)
  %Z = fadd double %Y, 0.0
  ret double %Z
}<commit_msg>[InstCombine] use FileCheck for better checking<commit_after>; NOTE: Assertions have been autogenerated by update_test_checks.py
; RUN: opt < %s -instcombine -S | FileCheck %s

declare double @abs(double)

define double @test(double %X) {
; CHECK-LABEL: @test(
; CHECK:         [[Y:%.*]] = fadd double %X, 0.000000e+00
; CHECK-NEXT:    ret double [[Y]]
;
  %Y = fadd double %X, 0.0          ;; Should be a single add x, 0.0
  %Z = fadd double %Y, 0.0
  ret double %Z
}

define double @test1(double %X) {
; CHECK-LABEL: @test1(
; CHECK:         [[Y:%.*]] = call double @abs(double %X)
; CHECK-NEXT:    ret double [[Y]]
;
  %Y = call double @abs(double %X)
  %Z = fadd double %Y, 0.0
  ret double %Z
}
{'fraction_non_alphanumeric': 0.15700934579439252, 'fraction_numerical': 0.02897196261682243, 'mean_word_length': 3.026315789473684, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '366249', 'n_tokens_mistral': 431, 'n_tokens_neox': 408, 'n_words': 142}