Fix build breaks after r277028

llvm-svn: 277031
This commit is contained in:
Krzysztof Parzyszek 2016-07-28 20:25:21 +00:00
parent 93320393a4
commit 6400dec5ab
2 changed files with 5 additions and 1 deletions

View File

@ -1592,6 +1592,7 @@ bool MachineConstEvaluator::evaluateZEXTr(const Register &R1, unsigned Width,
bool MachineConstEvaluator::evaluateZEXTi(const APInt &A1, unsigned Width,
unsigned Bits, APInt &Result) {
unsigned BW = A1.getBitWidth();
(void)BW;
assert(Width >= Bits && BW >= Bits);
APInt Mask = APInt::getLowBitsSet(Width, Bits);
Result = A1.zextOrTrunc(Width) & Mask;

View File

@ -1,9 +1,12 @@
; RUN: llc < %s -print-machineinstrs=expand-isel-pseudos -o /dev/null 2>&1 | FileCheck %s
; ARM & AArch64 run an extra SimplifyCFG which disrupts this test.
; Hexagon crashes (PR23377)
; XFAIL: arm,aarch64
; Hexagon runs passes that renumber the basic blocks, causing this test
; to fail.
; XFAIL: hexagon
; Make sure we have the correct weight attached to each successor.
define i32 @test2(i32 %x) nounwind uwtable readnone ssp {
; CHECK-LABEL: Machine code for function test2: