2016-07-17 00:31:58 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
|
|
; RUN: opt < %s -instcombine -S | FileCheck %s
|
2005-01-02 00:14:46 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define i32 @test1(i8 %X) {
|
2016-07-17 00:31:58 +08:00
|
|
|
; CHECK-LABEL: @test1(
|
2016-07-21 08:24:18 +08:00
|
|
|
; CHECK-NEXT: [[TMP1:%.*]] = and i8 %X, 8
|
|
|
|
; CHECK-NEXT: [[Z:%.*]] = zext i8 [[TMP1]] to i32
|
2016-07-17 00:31:58 +08:00
|
|
|
; CHECK-NEXT: ret i32 [[Z]]
|
|
|
|
;
|
|
|
|
%Y = zext i8 %X to i32
|
|
|
|
%Z = and i32 %Y, 65544
|
|
|
|
ret i32 %Z
|
2005-01-02 00:14:46 +08:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
|