[all-commits] [llvm/llvm-project] 3a503a: [x86] fix miscompile from wrongly identified fneg

Sanjay Patel via All-commits all-commits at lists.llvm.org
Wed Jun 1 06:56:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3a503a4a9c1fa04020a8c64524234ea0269f80bd
      https://github.com/llvm/llvm-project/commit/3a503a4a9c1fa04020a8c64524234ea0269f80bd
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-06-01 (Wed, 01 Jun 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/neg_fp.ll

  Log Message:
  -----------
  [x86] fix miscompile from wrongly identified fneg

We may need to peek through a bitcast when identifying an fneg idiom
via its pool constant, but we can't allow a different-sized constant
in that match.

This is noted in issue #55758 with an example that needs fast-math,
but as the test here shows, this has potential to miscompile more
generally (no fast-math required).

Differential Revision: https://reviews.llvm.org/D126775




More information about the All-commits mailing list