[all-commits] [llvm/llvm-project] 4792f9: [PowerPC] Diagnose invalid combination with Altive...

Chen Zheng via All-commits all-commits at lists.llvm.org
Thu Jan 25 17:28:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4792f912b232141ecba4cbae538873be3c28556c
      https://github.com/llvm/llvm-project/commit/4792f912b232141ecba4cbae538873be3c28556c
  Author: Chen Zheng <czhengsz at cn.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M clang/lib/Basic/Targets/PPC.cpp
    M clang/test/CodeGen/PowerPC/attr-target-ppc.c
    M clang/test/Driver/ppc-dependent-options.cpp

  Log Message:
  -----------
  [PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float (#79109)

Moved from https://reviews.llvm.org/D126302

The current behaviour with these three options is quite undesirable:
-mno-altivec -mvsx allows VSX to override no Altivec, thereby turning on
both
-msoft-float -maltivec causes a crash if an actual Altivec instruction
is required because soft float turns of Altivec
-msoft-float -mvsx is also accepted with both Altivec and VSX turned off
(potentially causing crashes as above)

This patch diagnoses these impossible combinations in the driver so the
user does not end up with surprises in terms of their options being
ignored or silently overridden.

Fixes https://github.com/llvm/llvm-project/issues/55556

---------

Co-authored-by: Nemanja Ivanovic <nemanja.i.ibm at gmail.com>




More information about the All-commits mailing list