OSDN Git Service

[SystemZ] Add a check against zero before calling getTestUnderMaskCond()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 26 Jun 2017 13:38:27 +0000 (13:38 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Mon, 26 Jun 2017 13:38:27 +0000 (13:38 +0000)
commit018c368d384cb32c7a9985a87b89d2d713051c14
tree8ea055ed7be8f52b63be596f91f5048ef614bef6
parentb76f903b2e3e31fac20810bd7176d47bb792be88
[SystemZ]  Add a check against zero before calling getTestUnderMaskCond()

Csmith discovered that this function can be called with a zero argument,
in which case an assert for this triggered.

This patch also adds a guard before the other call to this function since
it was missing, although the test only covers the case where it was
discovered.

Reduced test case attached as CodeGen/SystemZ/int-cmp-54.ll.

Review: Ulrich Weigand

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306287 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/int-cmp-54.ll [new file with mode: 0644]