[all-commits] [llvm/llvm-project] 92c1bc: [CodeGen][inlineasm] assume the flag output of inl...

Yuanfang Chen via All-commits all-commits at lists.llvm.org
Tue Aug 2 11:49:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92c1bc61586c9d6c7bf0c36b1005fe00b4f48cc0
      https://github.com/llvm/llvm-project/commit/92c1bc61586c9d6c7bf0c36b1005fe00b4f48cc0
  Author: Yuanfang Chen <yuanfang.chen at sony.com>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M clang/lib/CodeGen/CGStmt.cpp
    M clang/test/CodeGen/inline-asm-x86-flag-output.c

  Log Message:
  -----------
  [CodeGen][inlineasm] assume the flag output of inline asm is boolean value

GCC inline asm document says that
"... the general rule is that the output variable must be a scalar
integer, and the value is boolean."

Commit e5c37958f901cc9bec50624dbee85d40143e4bca lowers flag output of
inline asm on X86 with setcc, hence it is guaranteed that the flag
is of boolean value. Clang does not support ARM inline asm flag output
yet so nothing need to be worried about ARM.

See "Flag Output" section at
https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#OutputOperands

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

Reviewed By: nikic

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




More information about the All-commits mailing list