• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -instcombine -S | FileCheck %s
2; PR1940
3
4define i1 @test1(i8 %A, i8 %B) {
5        %a = zext i8 %A to i32
6        %b = zext i8 %B to i32
7        %c = icmp sgt i32 %a, %b
8        ret i1 %c
9; CHECK: %c = icmp ugt i8 %A, %B
10; CHECK: ret i1 %c
11}
12
13define i1 @test2(i8 %A, i8 %B) {
14        %a = sext i8 %A to i32
15        %b = sext i8 %B to i32
16        %c = icmp ugt i32 %a, %b
17        ret i1 %c
18; CHECK: %c = icmp ugt i8 %A, %B
19; CHECK: ret i1 %c
20}
21