[all-commits] [llvm/llvm-project] b931e2: [PowerPC] PPCBoolRetToInt: Don't translate Constan...

bzEq via All-commits all-commits at lists.llvm.org
Fri Aug 28 02:00:21 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: b931e22c954374acf75c4f1d1f2666f3f8e67470
      https://github.com/llvm/llvm-project/commit/b931e22c954374acf75c4f1d1f2666f3f8e67470
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2020-08-28 (Fri, 28 Aug 2020)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
    A llvm/test/CodeGen/PowerPC/pr46923.ll

  Log Message:
  -----------
  [PowerPC] PPCBoolRetToInt: Don't translate Constant's operands

When collecting `i1` values via `findAllDefs`, ignore Constant's
operands, since Constant's operands might not be `i1`.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46923 which causes ICE
```
llvm-project/llvm/lib/IR/Constants.cpp:1924: static llvm::Constant *llvm::ConstantExpr::getZExt(llvm::Constant *, llvm::Type *, bool): Assertion `C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed.
```

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

(cherry picked from commit cbea17568f4301582c1d5d43990f089ca6cff522)




More information about the All-commits mailing list