<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Sorry, I’ll keep in mind.<o:p></o:p></p>
<p class="MsoNormal">This revert is just for “wrong patch ID in commit comment”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">it should be D109488 not D109354.<o:p></o:p></p>
<p class="MsoNormal">Sorry for my mistake!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you so much!<o:p></o:p></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Craig Topper <craig.topper@gmail.com> <br>
<b>Sent:</b> Tuesday, September 14, 2021 5:52 AM<br>
<b>To:</b> Zhang, Xiang1 <xiang1.zhang@intel.com>; Xiang1 Zhang <llvmlistbot@llvm.org><br>
<b>Cc:</b> cfe-commits <cfe-commits@lists.llvm.org><br>
<b>Subject:</b> Re: [clang] bdce8d4 - Revert "[X86] Adjust Keylocker handle mem size"<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">When reverting patches, please include the reason in the commit message.<o:p></o:p></p>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">~Craig<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Sep 13, 2021 at 3:01 AM Xiang1 Zhang via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Author: Xiang1 Zhang<br>
Date: 2021-09-13T18:00:46+08:00<br>
New Revision: bdce8d40c6da56f1c95a8d7bfeac12b1ffce79cf<br>
<br>
URL: <a href="https://github.com/llvm/llvm-project/commit/bdce8d40c6da56f1c95a8d7bfeac12b1ffce79cf" target="_blank">
https://github.com/llvm/llvm-project/commit/bdce8d40c6da56f1c95a8d7bfeac12b1ffce79cf</a><br>
DIFF: <a href="https://github.com/llvm/llvm-project/commit/bdce8d40c6da56f1c95a8d7bfeac12b1ffce79cf.diff" target="_blank">
https://github.com/llvm/llvm-project/commit/bdce8d40c6da56f1c95a8d7bfeac12b1ffce79cf.diff</a><br>
<br>
LOG: Revert "[X86] Adjust Keylocker handle mem size"<br>
<br>
This reverts commit 3731de6b7f2d42d40151f9574636bc4d5ccfa5e3.<br>
<br>
Added: <br>
<br>
<br>
Modified: <br>
clang/lib/CodeGen/CGBuiltin.cpp<br>
clang/lib/Headers/keylockerintrin.h<br>
clang/test/CodeGen/X86/keylocker.c<br>
llvm/test/CodeGen/X86/keylocker-intrinsics.ll<br>
<br>
Removed: <br>
<br>
<br>
<br>
################################################################################<br>
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp<br>
index d485e8e767692..727fc19f1a23f 100644<br>
--- a/clang/lib/CodeGen/CGBuiltin.cpp<br>
+++ b/clang/lib/CodeGen/CGBuiltin.cpp<br>
@@ -14905,7 +14905,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,<br>
<br>
Value *Call = Builder.CreateCall(CGM.getIntrinsic(IID), {Ops[0], Ops[1]});<br>
<br>
- for (int i = 0; i < 3; ++i) {<br>
+ for (int i = 0; i < 6; ++i) {<br>
Value *Extract = Builder.CreateExtractValue(Call, i + 1);<br>
Value *Ptr = Builder.CreateConstGEP1_32(Int8Ty, Ops[2], i * 16);<br>
Ptr = Builder.CreateBitCast(<br>
@@ -14921,7 +14921,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,<br>
Value *Call =<br>
Builder.CreateCall(CGM.getIntrinsic(IID), {Ops[0], Ops[1], Ops[2]});<br>
<br>
- for (int i = 0; i < 4; ++i) {<br>
+ for (int i = 0; i < 7; ++i) {<br>
Value *Extract = Builder.CreateExtractValue(Call, i + 1);<br>
Value *Ptr = Builder.CreateConstGEP1_32(Int8Ty, Ops[3], i * 16);<br>
Ptr = Builder.CreateBitCast(<br>
<br>
diff --git a/clang/lib/Headers/keylockerintrin.h b/clang/lib/Headers/keylockerintrin.h<br>
index ad9428e6c8b57..68b0a5689618a 100644<br>
--- a/clang/lib/Headers/keylockerintrin.h<br>
+++ b/clang/lib/Headers/keylockerintrin.h<br>
@@ -99,7 +99,7 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,<br>
}<br>
<br>
/// Wrap a 128-bit AES key from __key into a key handle and output in<br>
-/// ((__m128i*)__h) to ((__m128i*)__h) + 2 and a 32-bit value as return.<br>
+/// ((__m128i*)__h) to ((__m128i*)__h) + 5 and a 32-bit value as return.<br>
/// The explicit source operand __htype specifies handle restrictions.<br>
///<br>
/// \headerfile <x86intrin.h><br>
@@ -120,6 +120,9 @@ _mm_loadiwkey (unsigned int __ctl, __m128i __intkey,<br>
/// MEM[__h+127:__h] := Handle[127:0] // AAD<br>
/// MEM[__h+255:__h+128] := Handle[255:128] // Integrity Tag<br>
/// MEM[__h+383:__h+256] := Handle[383:256] // CipherText<br>
+/// MEM[__h+511:__h+384] := 0 // Reserved for future usage<br>
+/// MEM[__h+639:__h+512] := 0 // Reserved for future usage<br>
+/// MEM[__h+767:__h+640] := 0 // Reserved for future usage<br>
/// OF := 0<br>
/// SF := 0<br>
/// ZF := 0<br>
@@ -133,7 +136,7 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {<br>
}<br>
<br>
/// Wrap a 256-bit AES key from __key_hi:__key_lo into a key handle, then<br>
-/// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 3 and<br>
+/// output handle in ((__m128i*)__h) to ((__m128i*)__h) + 6 and<br>
/// a 32-bit value as return.<br>
/// The explicit source operand __htype specifies handle restrictions.<br>
///<br>
@@ -157,6 +160,9 @@ _mm_encodekey128_u32(unsigned int __htype, __m128i __key, void *__h) {<br>
/// MEM[__h+255:__h+128] := Handle[255:128] // Tag<br>
/// MEM[__h+383:__h+256] := Handle[383:256] // CipherText[127:0]<br>
/// MEM[__h+511:__h+384] := Handle[511:384] // CipherText[255:128]<br>
+/// MEM[__h+639:__h+512] := 0 // Reserved for future usage<br>
+/// MEM[__h+767:__h+640] := 0 // Reserved for future usage<br>
+/// MEM[__h+895:__h+768] := 0 Integrity// Reserved for future usage<br>
/// OF := 0<br>
/// SF := 0<br>
/// ZF := 0<br>
<br>
diff --git a/clang/test/CodeGen/X86/keylocker.c b/clang/test/CodeGen/X86/keylocker.c<br>
index a87281c5bd3fc..ded6e57bfb8b6 100644<br>
--- a/clang/test/CodeGen/X86/keylocker.c<br>
+++ b/clang/test/CodeGen/X86/keylocker.c<br>
@@ -98,8 +98,20 @@ void test_loadiwkey(unsigned int ctl, __m128i intkey, __m128i enkey_lo, __m128i<br>
// CHECK64-NEXT: [[TMP13:%.*]] = getelementptr i8, i8* [[TMP5]], i32 32<br>
// CHECK64-NEXT: [[TMP14:%.*]] = bitcast i8* [[TMP13]] to <2 x i64>*<br>
// CHECK64-NEXT: store <2 x i64> [[TMP12]], <2 x i64>* [[TMP14]], align 1<br>
-// CHECK64-NEXT: [[TMP15:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 0<br>
-// CHECK64-NEXT: ret i32 [[TMP15]]<br>
+// CHECK64-NEXT: [[TMP15:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 4<br>
+// CHECK64-NEXT: [[TMP16:%.*]] = getelementptr i8, i8* [[TMP5]], i32 48<br>
+// CHECK64-NEXT: [[TMP17:%.*]] = bitcast i8* [[TMP16]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP15]], <2 x i64>* [[TMP17]], align 1<br>
+// CHECK64-NEXT: [[TMP18:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 5<br>
+// CHECK64-NEXT: [[TMP19:%.*]] = getelementptr i8, i8* [[TMP5]], i32 64<br>
+// CHECK64-NEXT: [[TMP20:%.*]] = bitcast i8* [[TMP19]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP18]], <2 x i64>* [[TMP20]], align 1<br>
+// CHECK64-NEXT: [[TMP21:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 6<br>
+// CHECK64-NEXT: [[TMP22:%.*]] = getelementptr i8, i8* [[TMP5]], i32 80<br>
+// CHECK64-NEXT: [[TMP23:%.*]] = bitcast i8* [[TMP22]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP21]], <2 x i64>* [[TMP23]], align 1<br>
+// CHECK64-NEXT: [[TMP24:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 0<br>
+// CHECK64-NEXT: ret i32 [[TMP24]]<br>
//<br>
// CHECK32-LABEL: @test_encodekey128_u32(<br>
// CHECK32-NEXT: entry:<br>
@@ -133,8 +145,20 @@ void test_loadiwkey(unsigned int ctl, __m128i intkey, __m128i enkey_lo, __m128i<br>
// CHECK32-NEXT: [[TMP13:%.*]] = getelementptr i8, i8* [[TMP5]], i32 32<br>
// CHECK32-NEXT: [[TMP14:%.*]] = bitcast i8* [[TMP13]] to <2 x i64>*<br>
// CHECK32-NEXT: store <2 x i64> [[TMP12]], <2 x i64>* [[TMP14]], align 1<br>
-// CHECK32-NEXT: [[TMP15:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 0<br>
-// CHECK32-NEXT: ret i32 [[TMP15]]<br>
+// CHECK32-NEXT: [[TMP15:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 4<br>
+// CHECK32-NEXT: [[TMP16:%.*]] = getelementptr i8, i8* [[TMP5]], i32 48<br>
+// CHECK32-NEXT: [[TMP17:%.*]] = bitcast i8* [[TMP16]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP15]], <2 x i64>* [[TMP17]], align 1<br>
+// CHECK32-NEXT: [[TMP18:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 5<br>
+// CHECK32-NEXT: [[TMP19:%.*]] = getelementptr i8, i8* [[TMP5]], i32 64<br>
+// CHECK32-NEXT: [[TMP20:%.*]] = bitcast i8* [[TMP19]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP18]], <2 x i64>* [[TMP20]], align 1<br>
+// CHECK32-NEXT: [[TMP21:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 6<br>
+// CHECK32-NEXT: [[TMP22:%.*]] = getelementptr i8, i8* [[TMP5]], i32 80<br>
+// CHECK32-NEXT: [[TMP23:%.*]] = bitcast i8* [[TMP22]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP21]], <2 x i64>* [[TMP23]], align 1<br>
+// CHECK32-NEXT: [[TMP24:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP6]], 0<br>
+// CHECK32-NEXT: ret i32 [[TMP24]]<br>
//<br>
unsigned int test_encodekey128_u32(unsigned int htype, __m128i key, void *h) {<br>
return _mm_encodekey128_u32(htype, key, h);<br>
@@ -182,8 +206,20 @@ unsigned int test_encodekey128_u32(unsigned int htype, __m128i key, void *h) {<br>
// CHECK64-NEXT: [[TMP18:%.*]] = getelementptr i8, i8* [[TMP7]], i32 48<br>
// CHECK64-NEXT: [[TMP19:%.*]] = bitcast i8* [[TMP18]] to <2 x i64>*<br>
// CHECK64-NEXT: store <2 x i64> [[TMP17]], <2 x i64>* [[TMP19]], align 1<br>
-// CHECK64-NEXT: [[TMP20:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 0<br>
-// CHECK64-NEXT: ret i32 [[TMP20]]<br>
+// CHECK64-NEXT: [[TMP20:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 5<br>
+// CHECK64-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[TMP7]], i32 64<br>
+// CHECK64-NEXT: [[TMP22:%.*]] = bitcast i8* [[TMP21]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP20]], <2 x i64>* [[TMP22]], align 1<br>
+// CHECK64-NEXT: [[TMP23:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 6<br>
+// CHECK64-NEXT: [[TMP24:%.*]] = getelementptr i8, i8* [[TMP7]], i32 80<br>
+// CHECK64-NEXT: [[TMP25:%.*]] = bitcast i8* [[TMP24]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP23]], <2 x i64>* [[TMP25]], align 1<br>
+// CHECK64-NEXT: [[TMP26:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 7<br>
+// CHECK64-NEXT: [[TMP27:%.*]] = getelementptr i8, i8* [[TMP7]], i32 96<br>
+// CHECK64-NEXT: [[TMP28:%.*]] = bitcast i8* [[TMP27]] to <2 x i64>*<br>
+// CHECK64-NEXT: store <2 x i64> [[TMP26]], <2 x i64>* [[TMP28]], align 1<br>
+// CHECK64-NEXT: [[TMP29:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 0<br>
+// CHECK64-NEXT: ret i32 [[TMP29]]<br>
//<br>
// CHECK32-LABEL: @test_encodekey256_u32(<br>
// CHECK32-NEXT: entry:<br>
@@ -227,8 +263,20 @@ unsigned int test_encodekey128_u32(unsigned int htype, __m128i key, void *h) {<br>
// CHECK32-NEXT: [[TMP18:%.*]] = getelementptr i8, i8* [[TMP7]], i32 48<br>
// CHECK32-NEXT: [[TMP19:%.*]] = bitcast i8* [[TMP18]] to <2 x i64>*<br>
// CHECK32-NEXT: store <2 x i64> [[TMP17]], <2 x i64>* [[TMP19]], align 1<br>
-// CHECK32-NEXT: [[TMP20:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 0<br>
-// CHECK32-NEXT: ret i32 [[TMP20]]<br>
+// CHECK32-NEXT: [[TMP20:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 5<br>
+// CHECK32-NEXT: [[TMP21:%.*]] = getelementptr i8, i8* [[TMP7]], i32 64<br>
+// CHECK32-NEXT: [[TMP22:%.*]] = bitcast i8* [[TMP21]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP20]], <2 x i64>* [[TMP22]], align 1<br>
+// CHECK32-NEXT: [[TMP23:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 6<br>
+// CHECK32-NEXT: [[TMP24:%.*]] = getelementptr i8, i8* [[TMP7]], i32 80<br>
+// CHECK32-NEXT: [[TMP25:%.*]] = bitcast i8* [[TMP24]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP23]], <2 x i64>* [[TMP25]], align 1<br>
+// CHECK32-NEXT: [[TMP26:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 7<br>
+// CHECK32-NEXT: [[TMP27:%.*]] = getelementptr i8, i8* [[TMP7]], i32 96<br>
+// CHECK32-NEXT: [[TMP28:%.*]] = bitcast i8* [[TMP27]] to <2 x i64>*<br>
+// CHECK32-NEXT: store <2 x i64> [[TMP26]], <2 x i64>* [[TMP28]], align 1<br>
+// CHECK32-NEXT: [[TMP29:%.*]] = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } [[TMP8]], 0<br>
+// CHECK32-NEXT: ret i32 [[TMP29]]<br>
//<br>
unsigned int test_encodekey256_u32(unsigned int htype, __m128i key_lo, __m128i key_hi, void *h) {<br>
return _mm_encodekey256_u32(htype, key_lo, key_hi, h);<br>
<br>
diff --git a/llvm/test/CodeGen/X86/keylocker-intrinsics.ll b/llvm/test/CodeGen/X86/keylocker-intrinsics.ll<br>
index 6f900e456a662..2fe034e745d2c 100644<br>
--- a/llvm/test/CodeGen/X86/keylocker-intrinsics.ll<br>
+++ b/llvm/test/CodeGen/X86/keylocker-intrinsics.ll<br>
@@ -36,24 +36,40 @@ entry:<br>
define i32 @test_encodekey128_u32(i32 %htype, <2 x i64> %key, <2 x i64>* nocapture %h0, <2 x i64>* nocapture %h1, <2 x i64>* nocapture %h2, <2 x i64>* nocapture %h3, <2 x i64>* nocapture %h4, <2 x i64>* nocapture %h5) nounwind {<br>
; X64-LABEL: test_encodekey128_u32:<br>
; X64: # %bb.0: # %entry<br>
+; X64-NEXT: movq {{[0-9]+}}(%rsp), %r10<br>
; X64-NEXT: encodekey128 %edi, %eax<br>
; X64-NEXT: movaps %xmm0, (%rsi)<br>
; X64-NEXT: movaps %xmm1, (%rdx)<br>
; X64-NEXT: movaps %xmm2, (%rcx)<br>
+; X64-NEXT: movaps %xmm4, (%r8)<br>
+; X64-NEXT: movaps %xmm5, (%r9)<br>
+; X64-NEXT: movaps %xmm6, (%r10)<br>
; X64-NEXT: retq<br>
;<br>
; X32-LABEL: test_encodekey128_u32:<br>
; X32: # %bb.0: # %entry<br>
+; X32-NEXT: pushl %ebp<br>
+; X32-NEXT: pushl %ebx<br>
+; X32-NEXT: pushl %edi<br>
; X32-NEXT: pushl %esi<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi<br>
+; X32-NEXT: movl {{[0-9]+}}(%esp), %edi<br>
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ebx<br>
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ebp<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax<br>
; X32-NEXT: encodekey128 %eax, %eax<br>
-; X32-NEXT: vmovaps %xmm0, (%esi)<br>
-; X32-NEXT: vmovaps %xmm1, (%edx)<br>
-; X32-NEXT: vmovaps %xmm2, (%ecx)<br>
+; X32-NEXT: vmovaps %xmm0, (%ebp)<br>
+; X32-NEXT: vmovaps %xmm1, (%ebx)<br>
+; X32-NEXT: vmovaps %xmm2, (%edi)<br>
+; X32-NEXT: vmovaps %xmm4, (%esi)<br>
+; X32-NEXT: vmovaps %xmm5, (%edx)<br>
+; X32-NEXT: vmovaps %xmm6, (%ecx)<br>
; X32-NEXT: popl %esi<br>
+; X32-NEXT: popl %edi<br>
+; X32-NEXT: popl %ebx<br>
+; X32-NEXT: popl %ebp<br>
; X32-NEXT: retl<br>
entry:<br>
%0 = tail call { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @llvm.x86.encodekey128(i32 %htype, <2 x i64> %key)<br>
@@ -63,36 +79,53 @@ entry:<br>
store <2 x i64> %2, <2 x i64>* %h1, align 16<br>
%3 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 3<br>
store <2 x i64> %3, <2 x i64>* %h2, align 16<br>
- %4 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 0<br>
- ret i32 %4<br>
+ %4 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 4<br>
+ store <2 x i64> %4, <2 x i64>* %h3, align 16<br>
+ %5 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 5<br>
+ store <2 x i64> %5, <2 x i64>* %h4, align 16<br>
+ %6 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 6<br>
+ store <2 x i64> %6, <2 x i64>* %h5, align 16<br>
+ %7 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 0<br>
+ ret i32 %7<br>
}<br>
<br>
define i32 @test_encodekey256_u32(i32 %htype, <2 x i64> %key_lo, <2 x i64> %key_hi, <2 x i64>* nocapture %h0, <2 x i64>* nocapture %h1, <2 x i64>* nocapture %h2, <2 x i64>* nocapture %h3, <2 x i64>* nocapture %h4, <2 x i64>* nocapture %h5, <2 x i64>*
nocapture readnone %h6) nounwind {<br>
; X64-LABEL: test_encodekey256_u32:<br>
; X64: # %bb.0: # %entry<br>
+; X64-NEXT: movq {{[0-9]+}}(%rsp), %r10<br>
; X64-NEXT: encodekey256 %edi, %eax<br>
; X64-NEXT: movaps %xmm0, (%rsi)<br>
; X64-NEXT: movaps %xmm1, (%rdx)<br>
; X64-NEXT: movaps %xmm2, (%rcx)<br>
; X64-NEXT: movaps %xmm3, (%r8)<br>
+; X64-NEXT: movaps %xmm4, (%r9)<br>
+; X64-NEXT: movaps %xmm5, (%r10)<br>
; X64-NEXT: retq<br>
;<br>
; X32-LABEL: test_encodekey256_u32:<br>
; X32: # %bb.0: # %entry<br>
+; X32-NEXT: pushl %ebp<br>
+; X32-NEXT: pushl %ebx<br>
; X32-NEXT: pushl %edi<br>
; X32-NEXT: pushl %esi<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %edx<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %esi<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %edi<br>
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ebx<br>
+; X32-NEXT: movl {{[0-9]+}}(%esp), %ebp<br>
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax<br>
; X32-NEXT: encodekey256 %eax, %eax<br>
-; X32-NEXT: vmovaps %xmm0, (%edi)<br>
-; X32-NEXT: vmovaps %xmm1, (%esi)<br>
-; X32-NEXT: vmovaps %xmm2, (%edx)<br>
-; X32-NEXT: vmovaps %xmm3, (%ecx)<br>
+; X32-NEXT: vmovaps %xmm0, (%ebp)<br>
+; X32-NEXT: vmovaps %xmm1, (%ebx)<br>
+; X32-NEXT: vmovaps %xmm2, (%edi)<br>
+; X32-NEXT: vmovaps %xmm3, (%esi)<br>
+; X32-NEXT: vmovaps %xmm4, (%edx)<br>
+; X32-NEXT: vmovaps %xmm5, (%ecx)<br>
; X32-NEXT: popl %esi<br>
; X32-NEXT: popl %edi<br>
+; X32-NEXT: popl %ebx<br>
+; X32-NEXT: popl %ebp<br>
; X32-NEXT: retl<br>
entry:<br>
%0 = tail call { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } @llvm.x86.encodekey256(i32 %htype, <2 x i64> %key_lo, <2 x i64> %key_hi)<br>
@@ -104,8 +137,12 @@ entry:<br>
store <2 x i64> %3, <2 x i64>* %h2, align 16<br>
%4 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 4<br>
store <2 x i64> %4, <2 x i64>* %h3, align 16<br>
- %5 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 0<br>
- ret i32 %5<br>
+ %5 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 5<br>
+ store <2 x i64> %5, <2 x i64>* %h4, align 16<br>
+ %6 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 6<br>
+ store <2 x i64> %6, <2 x i64>* %h5, align 16<br>
+ %7 = extractvalue { i32, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64>, <2 x i64> } %0, 0<br>
+ ret i32 %7<br>
}<br>
<br>
define i8 @test_mm_aesenc128kl_u8(<2 x i64> %data, i8* %h, <2 x i64>* %out) {<br>
<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>