llvm-project/llvm/test/Transforms/InstSimplify/2010-12-20-Boolean.ll
Bjorn Pettersson b280ee1dd7 [test] Use -passes=instsimplify instead of -instsimplify in a number of tests. NFC
Another step moving away from the deprecated syntax of specifying
pass pipeline in opt.

Differential Revision: https://reviews.llvm.org/D119080
2022-02-07 14:26:58 +01:00

35 lines
570 B
LLVM

; NOTE: Assertions have been autogenerated by update_test_checks.py
; RUN: opt < %s -passes=instsimplify -S | FileCheck %s
define i1 @add(i1 %x) {
; CHECK-LABEL: @add(
; CHECK: ret i1 false
;
%z = add i1 %x, %x
ret i1 %z
}
define i1 @sub(i1 %x) {
; CHECK-LABEL: @sub(
; CHECK: ret i1 %x
;
%z = sub i1 false, %x
ret i1 %z
}
define i1 @mul(i1 %x) {
; CHECK-LABEL: @mul(
; CHECK: ret i1 %x
;
%z = mul i1 %x, %x
ret i1 %z
}
define i1 @ne(i1 %x) {
; CHECK-LABEL: @ne(
; CHECK: ret i1 %x
;
%z = icmp ne i1 %x, 0
ret i1 %z
}