Skip to content

Commit c5ce591

Browse files
committed
Add test
1 parent 8d38906 commit c5ce591

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+
; RUN: opt -S -passes=instsimplify < %s | FileCheck %s
3+
4+
target datalayout = "p:16:16:16:8"
5+
6+
; The GEP should only modify the low 8 bits of the pointer.
7+
define ptr @test() {
8+
; CHECK-LABEL: define ptr @test() {
9+
; CHECK-NEXT: ret ptr null
10+
;
11+
%base = inttoptr i16 -1 to ptr
12+
%gep = getelementptr i8, ptr %base, i8 1
13+
ret ptr %gep
14+
}

0 commit comments

Comments
 (0)