43 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=sparc | FileCheck %s -check-prefix=SPARC3 4define i32 @test_andn(i32 %x) nounwind {5; SPARC-LABEL: test_andn:6; SPARC: ! %bb.0: ! %entry7; SPARC-NEXT: sethi 4194272, %o18; SPARC-NEXT: retl9; SPARC-NEXT: andn %o0, %o1, %o010entry:11 %and = and i32 %x, 3276712 ret i32 %and13}14 15define i32 @test_orn(i32 %x) nounwind {16; SPARC-LABEL: test_orn:17; SPARC: ! %bb.0: ! %entry18; SPARC-NEXT: sethi 4194272, %o119; SPARC-NEXT: retl20; SPARC-NEXT: orn %o0, %o1, %o021entry:22 %or = or i32 %x, 3276723 ret i32 %or24}25 26; If constant is used more than once it is probably27; better to keep it in its original form.28define i32 @test_used_more_than_once(i32 %x) nounwind {29; SPARC-LABEL: test_used_more_than_once:30; SPARC: ! %bb.0: ! %entry31; SPARC-NEXT: sethi 31, %o132; SPARC-NEXT: or %o1, 1023, %o133; SPARC-NEXT: or %o0, %o1, %o234; SPARC-NEXT: and %o0, %o1, %o035; SPARC-NEXT: retl36; SPARC-NEXT: xor %o2, %o0, %o037entry:38 %0 = or i32 %x, 3276739 %and = and i32 %x, 3276740 %res = xor i32 %0, %and41 ret i32 %res42}43