• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2; RUN: opt < %s -newgvn -S | FileCheck %s
3; PR2213
4
5define i32* @f(i8* %x) {
6; CHECK-LABEL: @f(
7; CHECK-NEXT:  entry:
8; CHECK-NEXT:    [[TMP:%.*]] = call i8* @m(i32 12)
9; CHECK-NEXT:    [[TMP1:%.*]] = bitcast i8* [[TMP]] to i32*
10; CHECK-NEXT:    ret i32* [[TMP1]]
11;
12entry:
13  %tmp = call i8* @m( i32 12 )            ; <i8*> [#uses=2]
14  %tmp1 = bitcast i8* %tmp to i32*                ; <i32*> [#uses=0]
15  %tmp3 = bitcast i32* %tmp1 to i8*
16  %tmp2 = bitcast i8* %tmp3 to i32*                ; <i32*> [#uses=0]
17  ret i32* %tmp2
18}
19
20declare i8* @m(i32)
21