; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 ; RUN: opt -S -passes=instsimplify < %s | FileCheck %s target datalayout = "p:16:16:16:8" ; The GEP should only modify the low 8 bits of the pointer. define ptr @test() { ; CHECK-LABEL: define ptr @test() { ; CHECK-NEXT: ret ptr inttoptr (i16 -256 to ptr) ; %base = inttoptr i16 -1 to ptr %gep = getelementptr i8, ptr %base, i8 1 ret ptr %gep }