; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=instcombine -S | FileCheck %s

@c = external constant i8
@c2 = external constant i8

define i64 @testfunc() {
; CHECK-LABEL: @testfunc(
; CHECK-NEXT:    [[SHL1:%.*]] = shl nuw i64 1, ptrtoint (ptr @c2 to i64)
; CHECK-NEXT:    [[SHL2:%.*]] = shl i64 [[SHL1]], ptrtoint (ptr @c to i64)
; CHECK-NEXT:    ret i64 [[SHL2]]
;
  %shl1 = shl i64 1, ptrtoint (ptr @c2 to i64)
  %shl2 = shl i64 %shl1, ptrtoint (ptr @c to i64)
  ret i64 %shl2
}
