628 changes: 628 additions & 0 deletions llvm/test/Transforms/InstCombine/ptrtoint-nullgep.ll

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
; RUN: llc -mtriple=mips64-unknown-linux < %s | FileCheck %s

define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*){
%1 = invoke i32 @foo() to label %good unwind label %bad
good:
ret i32 5
bad:
%2 = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } %2
}

declare i32 @foo()
declare i32 @__gxx_personality_v0(...)
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mtriple=mips64-unknown-linux < %s | FileCheck %s

define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*){
; CHECK-LABEL: main:
; CHECK: # %bb.0:
; CHECK-NEXT: daddiu $sp, $sp, -16
; CHECK-NEXT: .cfi_def_cfa_offset 16
; CHECK-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill
; CHECK-NEXT: .cfi_offset 31, -8
; CHECK-NEXT: .Ltmp0:
; CHECK-NEXT: jal foo
; CHECK-NEXT: nop
; CHECK-NEXT: .Ltmp1:
; CHECK-NEXT: # %bb.1: # %good
; CHECK-NEXT: addiu $2, $zero, 5
; CHECK-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload
; CHECK-NEXT: jr $ra
; CHECK-NEXT: daddiu $sp, $sp, 16
; CHECK-NEXT: .LBB0_2: # %bad
; CHECK-NEXT: .Ltmp2:
; CHECK-NEXT: jal _Unwind_Resume
; CHECK-NEXT: nop
%1 = invoke i32 @foo() to label %good unwind label %bad
good:
ret i32 5
bad:
%2 = landingpad { i8*, i32 }
cleanup
resume { i8*, i32 } %2
}

declare i32 @foo()
declare i32 @__gxx_personality_v0(...)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# REQUIRES: mips-registered-target
## Check that we handle MIPS64 assembly output with an EH asm prologue

# RUN: cp -f %S/Inputs/mips64_eh.ll %t.ll && %update_llc_test_checks %t.ll
# RUN: diff -u %S/Inputs/mips64_eh.ll.expected %t.ll
1 change: 1 addition & 0 deletions llvm/unittests/Analysis/LoadsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ TEST(LoadsTest, FindAvailableLoadedValueSameBasePtrConstantOffsetsNullAA) {
LLVMContext C;
std::unique_ptr<Module> M = parseIR(C,
R"IR(
target datalayout = "p:64:64:64:32"
%class = type <{ i32, i32 }>
define i32 @f() {
Expand Down
1 change: 1 addition & 0 deletions llvm/utils/UpdateTestChecks/asm.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class string:

ASM_FUNCTION_MIPS_RE = re.compile(
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@"?(?P=func)"?\n[^:]*?' # f: (name of func)
r'(?:\s*\.?Ltmp[^:\n]*:\n)?[^:]*?' # optional .Ltmp<N> for EH
r'(?:^[ \t]+\.(frame|f?mask|set).*?\n)+' # Mips+LLVM standard asm prologue
r'(?P<body>.*?)\n' # (body of the function)
# Mips+LLVM standard asm epilogue
Expand Down
8 changes: 1 addition & 7 deletions llvm/utils/UpdateTestChecks/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
import subprocess
import sys

if sys.version_info[0] > 2:
class string:
expandtabs = str.expandtabs
else:
import string

##### Common utilities for update_*test_checks.py


Expand Down Expand Up @@ -266,7 +260,7 @@ def scrub_body(body):
# whitespace in place.
body = SCRUB_WHITESPACE_RE.sub(r' ', body)
# Expand the tabs used for indentation.
body = string.expandtabs(body, 2)
body = str.expandtabs(body, 2)
# Strip trailing whitespace.
body = SCRUB_TRAILING_WHITESPACE_TEST_RE.sub(r'', body)
return body
Expand Down