[PATCH] D110467: [ISEL] Legalize arithmetic.fence.f128 for 32-bits target

Xiang Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 19:52:03 PDT 2021


xiangzhangllvm created this revision.
Herald added subscribers: pengfei, hiraditya.
xiangzhangllvm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We meet an ERROR about  arithmetic fence in building same lib with in m32 target. 
The reason is Legalize not consider "transfer/convert" illegal type fp128 (in m32) for arithmetic.fence.
Now fix it.

// clang -cc1  -triple i386-pc-linux-gnu  -mreassociate  t.c -emit-llvm -o t.ll; llc t.l
// clang -cc1  -triple i386-pc-linux-gnu  -mreassociate -S -o t.s -x c t.c

typedef __float128 TYPE;

TYPE foo(TYPE *qr) {
 TYPE re =__arithmetic_fence(*qr);
 return re;
}


https://reviews.llvm.org/D110467

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
  llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
  llvm/test/CodeGen/X86/arithmetic_fence.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110467.375010.patch
Type: text/x-patch
Size: 5773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210925/39ab9070/attachment.bin>


More information about the llvm-commits mailing list