We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d77fd commit bd8a2efCopy full SHA for bd8a2ef
llvm/test/CodeGen/X86/combine-setcc-trunc-add.ll
@@ -121,3 +121,18 @@ entry:
121
%1 = icmp ne i64 %0, 844424930131968
122
ret i1 %1
123
}
124
+
125
+define i32 @test_trunc_add(i64 %x) {
126
+; X64-LABEL: test_trunc_add:
127
+; X64: # %bb.0: # %entry
128
+; X64-NEXT: movabsq $3940649673949184, %rax # imm = 0xE000000000000
129
+; X64-NEXT: addq %rdi, %rax
130
+; X64-NEXT: shrq $48, %rax
131
+; X64-NEXT: # kill: def $eax killed $eax killed $rax
132
+; X64-NEXT: retq
133
+entry:
134
+ %add = add i64 %x, 3940649673949184
135
+ %shr = lshr i64 %add, 48
136
+ %conv = trunc i64 %shr to i32
137
+ ret i32 %conv
138
+}
0 commit comments